Learn the science behind color mixing

Publisher:SereneHeartLatest update time:2012-08-24 Source: 电子工程专辑 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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:

(Electronic Engineering Times)

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.

(Electronic Engineering Times)
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.

(Electronic Engineering Times)
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.

(Electronic Engineering Times)
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.

(Electronic Engineering Times)
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.

(Electronic Engineering Times)
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.

(Electronic Engineering Times)
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.

(Electronic Engineering Times)
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.

Reference address:Learn the science behind color mixing

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

LED lighting system design method
As a display device, LED has been increasingly used in more and more fields due to its advantages such as high luminous efficiency, long service life and easy control. Especially since 2005, it has been widely used in urban/stage lighting systems. This article mainly introduces the types of LED lights, the introduct
[Power Management]
LED lighting system design method
Application of high brightness LED in lighting
Since the birth of the first light-emitting diode in the 1960s, for a long time, LEDs were only used for signal indication purposes due to the limitation of output lumens. In the 1990s, blue light LEDs were commercialized due to a more economical implementation method. In the 21st century, high-power white light LED
[Power Management]
Application of high brightness LED in lighting
LED installation method LED cleaning
LED installation method LED cleaning LED lights are new, but as long as you are careful and careful during the installation process, you can still make a successful product. Here are some small common sense about LED lights LED Installation Method (1) Pay attention to the arra
[Power Management]
Comparative analysis of thermal resistance of alumina and silicon LED integrated packaging substrate materials
Figure 1 shows the structure currently used in high-power LED packaging. The LED chip will first be packaged on a thermally conductive substrate, and then gold wire and sealing glue will be applied. This LED packaging structure has the advantages of being lightweight, high thermal conductivity and simple circuits, a
[Power Management]
Comparative analysis of thermal resistance of alumina and silicon LED integrated packaging substrate materials
Jucan Optoelectronics' Q3 net profit increased 21 times due to booming mid- to high-end LED chip market
On October 15, Jucan Optoelectronics released its third-quarter report stating that from July to September 2021, the company achieved operating income of 518 million yuan, a year-on-year increase of 32.07%; the net profit attributable to shareholders of listed companies was 63 million yuan, a year-on-year increase of
[Mobile phone portable]
Jucan Optoelectronics' Q3 net profit increased 21 times due to booming mid- to high-end LED chip market
AC drive LED cannot avoid the essential constant current control technology analysis
1. AC LED is not a fundamental change in the device. In other words, there actually does not exist an LED chip that works with an alternating electric field mechanism. The AC LED that is now available is a device with a special arrangement of internal chipsets. It is merely a change in the internal structure of
[Power Management]
STC89C52 drives MAX7219LED dot matrix cascade, text scrolling effect
Value transfer method under cascade In cascade, N MAX7219s form a latch with a width of 8*N bits. If you need to write to the Mth 7219, you need to do M addressing + pull up CS after writing to reach this 7219. If you only operate this 7219 and do not operate other 7219s, then after the first addressing write, the add
[Microcontroller]
LNK405EG:15WPAR38TRIAC dimming LED driver solution
This article describes a high power factor (PF) TRIAC dimming LED driver from Powerint. The driver is designed to drive a nominal LED string voltage of 30V (at 0.5A) with an input voltage range of 180VAC to 265VAC. The LED driver uses the LNK405EG from the LinkSwitch-PH family of ICs. The LinkSwitch-PH IC enables a lo
[Power Management]
LNK405EG:15WPAR38TRIAC dimming LED driver solution
Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号