High brightness (HB) LEDs are becoming more popular due to their advantages over traditional lighting solutions. One of the advantages of high brightness LEDs is their ability to generate different colors, which opens up a new world in the field of decorative lighting.
Color mixing is essentially the process of creating secondary colors by mixing primary colors in appropriate proportions. This article will explain the science behind color mixing, including the mathematical formulas involved and how to apply them effectively.
The Science Behind Color Mixing and Multi-Point Motivation Spaces
Primary colors are not fundamental properties of light, but are often involved in the eye's psychological response to light. It is believed that primary colors are completely independent of each other, but can be combined to produce a useful range of colors (color gamut).
Similar to any other mathematical representation of a physical phenomenon, color models can be expressed in different ways. Each model has its own advantages and disadvantages. The goal of modeling is to minimize the complexity of the formula and the number of variables while maximizing "substance" and coverage.
Traditionally, three of them are sufficient to describe all colors, regardless of the meanings assigned to the variables: RGB, hue-saturation-brightness (HSB), and other hue-saturation-based models such as L×a×b and xyY. A common feature of them is the number of variables or dimensionality.
In the multi-point stimulus space, color stimuli are labeled by letters such as R, Q, G, B, and A. Q refers to the stimulus of any color; the letters R, G, B, and A are reserved to represent fixed basic stimuli selected for color matching experiments. Red, green, blue, and amber are basic stimuli.
Color matching refers to the additive mixture obtained by mixing the various basic stimuli R, G, B and A in appropriate quantities for a given stimulus Q, which can be expressed by a vector equation (Formula 1) as follows:
Formula 1
In multidimensional space, color stimulus Q is expressed by a multipoint stimulus vector Q; wherein: the scalar multipliers RQ, GQ, BQ and AQ are measured in their respective agreed units of measurement given the basic stimuli R, G, B and A, respectively, and they are called multipoint stimulus values of Q.
Figure 1 is a geometric representation of the linear multidimensional space of Equation 1. Unit vectors R, G, B, and A represent the basic excitations that define the space. They have a common origin and point in four different directions.
Figure 1: Multidimensional color space.
The vector Q has the same origin as R, G, B, and A. Its four components are located on the axes defined by R, G, B, and A; their lengths are equal to the multi-point stimulus values of Q, RQ, GQ, BQ, and AQ, respectively. The direction and length can be obtained from a simple vector equation defined by equation (1). The space defined by R, G, B, and A is called the multi-stimulus space. In this space, the color stimulus Q can be viewed as a multi-stimulus vector (RQ, GQ, BQ, and AQ). In the color mixing algorithm, the firmware calculates what these values should be to obtain the color stimulus Q.
Color Mixing
Figure 2 shows the CIE 1932 chromaticity diagram. There are three LEDs in the diagram: red, green, and blue. By mixing two primary colors (such as red and blue) in appropriate proportions, it is possible to produce the colors on the line between them; similarly, when mixing blue and green, all colors on the line between blue and green can be produced.
Figure 2: CIE chromaticity diagram.
Mixing these three LED colors can produce any color within this triangle. This area is called the color gamut. However, in the CIE 1931 standard, the color distribution is uneven and discontinuous. Therefore, a linear transformation cannot be used when calculating the proportions of the primary colors to determine the desired secondary colors.
Color mixing algorithm
In color mixing applications, the firmware inputs values in the form of CIE chromaticity coordinates. For each LED channel, it converts the coordinates into the appropriate dimming value . In simple terms, the dimming value is the proportion of the maximum luminous flux that the LED must have for the dimming range. If the operating current of the LED is turned on and off quickly in an intelligent manner, the luminous flux output of the LED can be controlled.
The firmware combines this coordinate with pre-programmed knowledge of the characteristics of the LEDs used in the system. It then performs the necessary conversion functions to correctly convert the chromaticity coordinates into the brightness value of each LED. This process causes their light outputs to mix together to produce the chromaticity coordinates of the color input into the system.
Multi-channel color mixing
In three-channel color mixing, if the color points of the three LEDs are mapped to the CIE 1931 chart, a triangle is formed. If there are three LEDs, red, green, and blue, the triangle formed is called the color gamut (see Figure 2). Within the area of the triangle is the color gamut of the colors that can be achieved by these three specific LEDs. Any (X, Y) coordinate within the triangle is an input into the system. It provides a wide range of colors that the system can generate and a high resolution of specific colors.
The four-channel color mixing scheme is based on the superposition principle. It is based on the three-channel color mixing algorithm. For four-channel color mixing, if the color points of the four LEDs are mapped to a color space diagram, it is obvious that the lines between the four LED color points form four triangles, as shown in Figure 3.
Figure 3: Four-channel color mixing and superposition.
The method presented here can be easily extended to more than 4 LED colors. In Figure 3, the four triangles are composed of the following three LEDs: TR1 (R, G, B), TR2 (R, A, B), TR3 (R, G, B) and TR4 (G, A, B).
Solve each triangle to obtain the dimming value for the three-channel color mixing function. Of the four triangles, two give all non-negative dimming values; the other two have one or all negative dimming values. Triangles with negative values are invalid and should be discarded. Accumulate the dimming array for all positive values.
The explanation for negative dimming values is that the desired point is outside the triangle formed by the three basic colors. For example, in Figure 4, the RGB triangle returns all non-negative values for P1; for P2, at least one brightness value is negative.
Figure 4: Positive and negative dimming values.
Add two positive dimming values for each desired color and adapt appropriately. A negative dimming value means that the desired color is out of gamut and therefore cannot be produced using that particular primary color.
Color Mixing Implementation Details
The firmware takes input color requirements in the CIE 1931 color space. A specific point in the CIE 1931 color space is represented by three values (x, y, Y). The (x, y) defines the point, where: The X and Y values represent the hue and saturation of the color. Hue is one dimension of the CIE 1931 color space. Saturation is the second dimension of this color space. The third value of the (x, y, Y) vector specifies the luminous flux, expressed in lumens (lm). The firmware must have inputs of the (x, y, Y) vector, which specifies the color and luminous flux output at some rated current and junction temperature.
Figure 5 shows a color mixing algorithm block diagram using Cypress's PowerPSoC series controller; the PowerPSoC series controller is based on an 8-bit microcontroller and integrates four channels of independent constant current drivers with hysteresis controller characteristics. It also contains configurable analog and digital peripheral modules; the operating voltage is 7V to 32V; and the internal MOSFET switch can drive 1A current.
Figure 5: Block diagram of the color mixing algorithm implemented using Cypress's PowerPSoC.
Four-channel color mixing is implemented based on three-channel color mixing. The first step of the algorithm is to create a matrix. Then, the inverse matrix is found and multiplied by Ymix. Ymix is the number of lumens that the total mixed light output must produce. These steps are shown in Figure 6.
Figure 6: Three-channel color mixing flow chart.
The Y value of the product is the lumen output of each LED necessary to produce the desired color and flux.
At this point, the entire mathematical operation brings two benefits to operating in this way. If any Y value of the final product is negative, it indicates that the requested color coordinate requirement is invalid. In other words, the requested color is out of gamut.
Additionally, check the product's Y value. If it is greater than the maximum lumen output of any of the three LEDs, this means that the Ymix input is too large. In this case, the firmware scales these values down to produce the maximum possible luminous flux at the requested (X, Y) coordinates.
The flowchart in Figure 7 describes the steps required for the four-channel color mixing algorithm. If the color points of the four LEDs are mapped to this diagram, it forms four triangles. These triangles are formed by the following three LEDs: (R, G, B), (R, A, B), (R, G, A), and (G, A, B). In the flowchart, these triangles are represented as TRI1, TRI2, TRI3, and TRI4.
A three-pass algorithm is used to solve the dimming values for these triangles. Each triangle is solved to calculate the TR values. If any of the three dimming values obtained from this process are negative, then the solution is invalid. If the solution is valid, the three brightness values are saved. When two of the three sets of valid dimming values are obtained, there is no need to continue solving the other triangles.
The flow jumps to the process of adding two dimming value sets, as shown in Figure 7. The six saved brightness values are added together to get four values, one for each of the four LEDs in the system. These four values are scaled to the appropriate dimming resolution, and the process of solving for the brightness value is complete.
Figure 7: Four-channel color mixing flow chart.
Finally, these four dimming values are used as inputs to internal or external drivers that control the brightness of the LEDs by modulating the current in each channel. If any three of the four solutions are invalid, it means that the desired color is not in gamut.
This error condition can be enforced by the user. This can be achieved by continuing to retain the old color, turning off the LED, etc. These three-channel and four-channel color mixing algorithms can be extended to more LEDs and various lighting applications.
Previous article:Brief Introduction to the Light Color Measurement Method of Power-Type White Light LED Devices
Next article:Application of heat dissipation plastics in LED downlights/bulbs
Recommended ReadingLatest update time:2024-11-17 04:50
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Basic knowledge of FPGA architecture and applications
- Selection summary of mainstream Bluetooth BLE MESH module Bluetooth chip IC
- Is your phone RF ready for 5G?
- CC3200 Wi-Fi and IoT Solutions
- How to understand the measured voltage when the diode is reverse cutoff
- The actual cutoff frequency of the second-order low-pass filter on the PCB is lower than expected
- Python will soon support switch functionality
- Problems encountered when installing BlueNRG-1, BlueNRG-2 DK SW package 3.1
- [Evaluation of Anxinke Bluetooth Development Board PB-02-Kit] Development environment construction and download test
- A strange phenomenon of DCDC chip MP1470