Development of Automatic Digital Control Interface for Addressing a Lighting Equipment System Using High Power Load

Recently, automation technology for electrical equipment has become developed. The control technology platform under the IEC 62386 standard is an automation platform widely used in Europe and the US. Its main purpose is to construct a digital addressable lighting interface (DALI) that can remotely and randomly control and detect lighting and reduce labor requirements. The key to this technology is to develop the DALI bus, which can simultaneously transmit power and communication commands to a load. This can reduce the signal line requirements for lighting equipment automation and simplify the wiring. However, the DALI bus uses Manchester encoding technology to modulate a communication command to an electrical signal. Although it can also provide power, the communication command is randomly changed. The random distribution of harmonics caused by control commands carried out during the transmission of communication commands after modulation creates electromagnetic interference that cannot be predicted and prevented. Simultaneously, the random electrical signal modulated by Manchester encoding technology directly causes a system to be unable to provide stable and high power; therefore, the load power and loop distance must be limited. We propose the replacement of Manchester encoding technology with Pu’s count modulation (PKM) technology and propose a communication control platform that can control the transmission of power. In addition to solving the problem of the DALI bus, the DALI bus using PKM technology also increases the reliability of communication and reduces the hardware cost. A bidirectional communication system is established by using a Hall component to sense the current flowing through the specified DALI device and to extract the data packaged in the current. Finally, an Atmel chip and MATLAB® and Excel software are used for analysis to verify the feasibility of the proposed platform.


Introduction
Since the 1960s, build automation technology has been extensively developed to reduce dependence on labor. Its purpose is to structure electrical equipment such as heaters, air conditioners, motor drives, and lighting into a network for automatic control. Automation control technology platforms such as X10, Lonwork, and KNX are now mature and have been applied in different automation control fields. (1)(2)(3)(4)(5)(6) The DALI-2 protocol was proposed in 2016, with its main purpose being to establish an addressable lamp network system for space lighting equipment and carry out random automatic control of the equipment. This improves the traditional method of only using physical circuits to connect lighting, in which lights can only be simultaneously turned on or off and cannot be controlled independently. To achieve this function, we established a logical circuit possessing virtual physical circuits so that lighting can be controlled independently. This enables a variety of lighting control in combinations as required. The DALI-2 protocol is an extended version of the DALI-1 protocol and the new system architecture as shown in Fig. 1(a). As shown in Fig. 1(b), the new DALI bus supports electrical power and communication. In addition to providing power for lighting, it can also provide an application control host (ACH) and lighting. Intercommunication is mainly used in automated lighting systems in Europe and is mentioned in the IEC 62386 standard. Figures 1(a) and 1(b) respectively also show the DALI system control architecture with its related specifications and the DALI bus architecture with its related specifications. (6,7) The DALI-2 protocol mainly formulates LED lighting control strategies with digital addressing control, which includes three types of equipment.
(1) Electronic control gear (ECG) such as an electronic ballast connects the lighting to an ACH and is responsible for driving the lighting according to received commands. (2) Input control devices (ICDs) such as switches or sensors to sense signals. (3) The bus power supply shown in Fig. 1(a), which provides a voltage of 16 V and a current of 250 mA from both ends of 'DALI bus +' and 'DALI bus −'. Figures 2 and 3 show the entity and system communication architectures under the DALI-2 protocol, respectively.
The DALI-2 protocol stipulates that the DALI bus can simultaneously provide power and communication signals. The allowable operating voltage range is between 16 V (±6.5 V) and 0 V (±6.5 V). As shown in Fig. 4(a), biphase coded Manchester encoding technology is used to transmit the command data in the communication. According to the Manchester encoding principle, each bit of data requires a pulse time of two clocks (CK), and communication between both ends takes a time of (2 × n) pulses to transmit n bits of data; Fig. 2(b) shows that the DALI-2 protocol uses host-slave asynchronous serial mode communication, and the communication speed is 1200 bps. In other words, it takes 833.33 μs to transmit 1 bit of data. As shown in Fig. 3, during time T t , the ACH transmits data on the DALI bus to the specified ECG. Here, the data is a 19-bit forward frame including a start bit and stop bits, and an address byte, respectively specifying the lighting position and the data byte of the command, as shown in Fig. 4   Then within time T r , the specified ECG from the designated position must be received, and the 11-bit back frame including a start bit, stop bits, and a data byte, as shown in Fig. 4(c), is returned to the ACH. According to the previous communication packet format shown in Fig.  4(b), the format indirectly shows that the DALI-2 protocol can only specify 256 lights and can always be divided into four subfields. Each subfield can only control 64 lights. (7) In addition, the DALI-2 protocol only uses DALI bus communication and transmits power to the lighting, which reduces the cost of communication lines and simplifies the wiring. However, the DALI bus carries the electrical signal of Manchester encoded digital data because the random arrangement of '1' and '0' causes the relative frequency components of the electrical signal to be randomly distributed as shown by Eq. (1). In addition to preventing noise from interfering with communication, it is also necessary to prevent the response to resonance characteristics between circuits. More importantly, the power supplied to the DALI bus coded by Manchester encoding cannot switch the voltage level using a traditional transformer. The characteristic of the circuit directly limits the power of lighting connected to a DALI bus and can only control energysaving LED lighting, which indirectly affects the number of allowable consecutive lights. (7) However, researchers are still searching for a method to increase the power limit of the DALI bus. In addition, because the transmission data is not fixed, the function D( f ) of Eq. (1) shows the distribution probability of the frequency for the abovementioned random transmission if Manchester coding is used. In the formula, H represents the amplitude of the signal, T s represents the signal period, f represents the channel frequency, and P represents the probability of the occurrence of the bit. (8,9) (1) Figure 5 shows the frequency distribution of the data '10010' after Manchester encoding into ±5 V transmission electrical signals. (9)(10)(11) The spectrum in Fig. 5 is widely distributed, which directly shows that the communication space is flooded with interference sources of different frequencies at any time and indirectly shows that it is difficult to use a magnetic shielding design. To solve the problem of the spectrum distribution, we propose a Pu's count modulation (PKM) bus to replace the DALI bus. A PKM bus can still communicate and transmit power simultaneously. Moreover, when transmitting data, because the connection uses the same pulse wave, it can concentrate power during the communication in a random distribution. On the other hand, because a traditional transformer can be used to directly control the voltage, it can also solve the voltage drop problem caused by the cohesion of the bus and control the transmission of power. In Sect. 2, we explain the PKM technology and PK encoding characteristics, Sect. 3 verifies the feasibility of the proposed theory using actual data, and Sect. 4 gives a conclusion.

Materials and Methods
In recent years, for both 3C products and motor-variable frequency-drive control, in traditional applications, AC is first rectified to DC, and then power is transmitted to the electrical equipment through a bus. The European G.hn standard and the American Home Plug standard specify the transmission of the communication command to the AC power source for simultaneous communication through the circuit that transmits power. In addition, in some cases, the signal is directly sent to the rectified bus DC to communicate with the remote-driven induction motor. (8)(9)(10) In either case, the power of the transmitted command signal is insignificant compared with the power of the power supply, and the signal is easily attenuated by the saturation characteristics of the magnetic circuit and the influence of the power network environment. The DALI bus directly encodes the signal into a power signal in the Manchester code format (also known as the Manchester code power wave). Note that the power wave is not even slightly reduced by the magnetic circuit, which can indeed solve the aforementioned problems. It also reduces the interference of an electricity network environment. However, owing to the use of inappropriate coding techniques, it has become a larger source of environmental interference. (5) Although the signal modulated by Manchester encoding technology has a synchronization signal, the communication parties still need to agree on the length of the data (the number of bits of data) in advance, and it does not have fault tolerance. It is often necessary to add a cyclic redundancy check, and other error detection codes are used to identify the correctness of the data, which increase communication time.

PKM
PKM adopts the PK coding technology, which is responsible for converting DC into a PKM bus that hides the communication command power wave and provides the PKM power wave. It has the function of the DALI bus, which can provide power to electrical equipment during communication, without the shortcomings of the DALI bus.
As shown in Fig. 6, the concept mainly uses conversion packets to convert bit data into a pulse-wave sequence corresponding to the number of pulse waves. As shown in Fig. 6(a), a PK conversion packet is divided into two parts: the data zone and error zone. The data zone is responsible for displaying the transmitted bit data but first needs to be converted. The transmitted bit data is the unit. The corresponding table of data shown in Fig. 6(b) is selected and filled into data zone κ [b n b (n − 1) ] as shown in Fig. 6(a). The error zone is responsible for absorbing the interference caused by the noise in the communication process and increasing the fault tolerance of communication. The related values of γ are shown in Table 1, and the appropriate γ is selected according to the communication environment. (8)(9)(10) Finally, Eq. (1) is used to convert the PK conversion packet into a relative variable Nmb that is used to control the number of pulse outputs. This is the reverse of the PK encoding process and called PK decoding.
(2) Figure 7 shows the PK-encoded output waveform, which is a set of pulse-wave sequences. The set of pulse-wave sequences can be found by observation of the waveform. Similar to the Manchester coded waveform, it also hides a synchronization signal. (8) As shown in Fig. 8, after the PK encoding, the bridge inverter circuit built using Q1-Q4 converts the traditional DC bus voltage V, and the output AC power pulse Vd is called the PKM power wave. The number of pulses is equal to Nmb.
However, the communication parties only need to calculate the number of pulse waves; thus, the pulse-wave speed f s can be changed at any time without a mutual preset. In addition, during the communication process, the sender can send a set of PK codes of κ(b n b (n+1) ) = κ(1 1) after the data transfer is completed to notify the receiver of the end of the transfer. Therefore, the communication parties do not need to agree on the length of the data in advance. In addition, in the communication process, as long as the counting error caused by noise is within the required range, the receiving end of communication can still receive the correct solution after PK decoding. (8) Fig. 6. PK coding theory in the PK coding principle: (a) PK code conversion packet and (b) data zone conversion table.

Strategy for automatic adjustment communication environment parameters
Regardless of whether the X10, Lonwork, Wifi, Zigbee, or KNX protocol or another protocol is used, the goal is to build an automated communication control platform to integrate existing electrical equipment based on different protocols. (1)(2)(3)(4)(5)(6)(11)(12)(13)(14)(15)(16) However, the specifications differ greatly among the protocols, especially the packet length, making integration difficult. In addition, the ultimate goal of the so-called automatic control is to include parameters, making it necessary to have the ability to automatically adjust the parameters randomly, especially since the concept of the Internet of Things has been proposed, so that everything can communicate with each other. However, the currently adopted communication control platform does not consider differences in the specifications of the different communication platforms and also lacks the ability to adapt to the communication environment. Because the communication environment changes randomly, ideally both parties should be able to adjust the best communication parameters at any time PKM power waves have the advantages of PK encoding, which can automatically identify the communication speed and data packet length used in motor drives and avoid baud rate discrimination by an RS-232 interface. (8,9) However, γ cannot be automatically selected. Therefore, we also propose a strategy based on the PK encoding method for automatically adjusting the communication environment parameter γ. From the PK conversion packet shown in Fig. 6(a), the error zone is used to transmit data in response to communication environments with different noise interference probabilities. Because PK decoding only counts the number of pulse sequences of the pulse wave disturbed by noise during transmission, the number of pulses received at the receiving end after dividing by 2 γ is still in the range between −[2 (γ−1) ] and [2 (γ−1) − 1]. However, as long as the frequency is within the allowable range, the actual data is not affected and can easily be recovered from the integer part of the value after dividing by 2 γ . The environmental parameter γ is identified using a set of test packets created by b c3 b c2 b c1 b c0 (Fig. 9), which are four bits sent before communication.
A formula is used to determine the packet length, because the number of bits n of the test packet determines the recognition of the packet σ by the receiver to prevent misjudgement caused by noise interference. In the formula, η is the probability value, calculated using the following equations.
The larger the ρ value, the greater the reliability of the packet. The length of four bits was chosen empirically. b c3 b c2 b c1 b c0 = '0000' was chosen because '0' has a relatively small number of pulses after PK encoding, which can effectively increase the recognition speed. However, in theory, the receiving end only counts the number of pulse sequences. When a test packet is received, the four received wave numbers are compared with the values listed in Table 2 to find the value of each bit.
However, considering the actual operation with noise interference, n represents the actual number of pulse sequences calculated using the receiving end, i represents the bit data of the received number i, and γ * is the correct communication environment parameter γ.
The calculation performed using the above formula shows that when no noise is generated, λ γ , which is the correct communication environment parameter γ, is 1, and when noise is generated, λ γ approaches 1. Otherwise, λ γ is far from 1; therefore, the communication environment parameter γ of 1 is the correct value.

Transmission power control strategy
We use DALI power waves because the use of Manchester coding technology for modulation causes noise in the random distribution of the spectrum; therefore, it is difficult to design shielding and transmit interference signals along the transmission line. Semiconductor automation equipment and industrial automation plants require a clean communications environment without significant interference from power harmonics; a DALI power wave that carries a large power is undoubtedly a fatal problem. Owing to the characteristics of the PKM power wave, the frequency spectrum in the communication process is mainly distributed and concentrated around the frequency f s of the pulse sequence. (9) Moreover, we find that even if the frequency f s is changed and the spectrum distribution is transferred to a different position, the communication can still be completed accurately. This shows that a PKM power wave instead of a DALI power wave can also control the frequency of the noise. Indeed, this is an application that meets the need to avoid specific frequency requirements for different environments. The PKM power wave is also concentrated around the pulse frequency because the frequency spectrum is narrow, and traditional transformers can be directly used to change the amplitude of the voltage and control the power flow. In addition to transmitting power, the PKM power wave can also transmit control commands. The PKM power wave adopts the not return zero (NRZ) format, and the receiving end only needs to pass through the bridge rectifier circuit. The PKM power wave can be very easily rectified into DC voltage. However, the PKM power wave can only provide a square wave of DC power for ECG. Thus, there are many modes of power waves for the PKM output such as RZ and NRZ waveforms, and the PKM power wave still provides a fixed voltage when it is not communicating. As shown in Fig. 10, each traditional ECG after passing through the bridge rectifier can still obtain the same voltage V provided using a PKM power wave modulated by an NRZ waveform, but cannot transfer data. The commands conveyed by the PKM power wave can be used to control the actions of each ECG at the remote end.
When the ECG receives the command, as shown in Fig. 11, the information to be returned is modulated by PKM in the RZ format. The selected ECG is driven by the electric wave. As shown in Fig. 11, i a is the load current, T PK (= 1/f s ) is the pulse period, and T r is the total time it takes for the PKM power wave to transmit one bit of data. Therefore, the entire circuit from the ACH to the ECG can be simplified to an equivalent circuit in which a lumped inductance (L) and a lumped resistance (R) are connected in series. The current i a can be calculated using the following equations for the period 0 ≤ t ≤ t 1 .
Similarly, the current i a for t 1 ≤ t < T PK is as follows.
During steady-generation operation, if i a is operated in a continuous current mode greater than zero, the average voltage of the ECG can be derived as In the above equations, i rip is the current ripple component, D is the voltage modulation coefficient, and i rip is provided by the ACH because the return current i rip is also the pulse sequence after the PK encoding. Therefore, as shown in Fig. 10, the receiver of the ACH can receive the information returned by the ECG using the driving current to complete two-way communication. If the loss of the transmission line is neglected, the average power P ECG transmitted can be deduced from the following formulas. It can be seen from Eqs. (17) and (18) that when the ECG performs PKM on the returned information according to the received command, it only needs to control the voltage modulation coefficient D to control the voltage of the output ECG and the power output to the ECG. Moreover, when the communication is complete, i rip needs to be locked in the ECG, which only needs to activate a band-stop filter circuit to prevent it from flowing out to the PKM bus. Therefore, for the original ECG to receive the PKM power wave, part of the circuit must be amplified to become the new ECG. The DALI architecture is shown in Figs. 1 and 2. The rectifier circuit in the figure is used to convert power waves into DC power to provide the original ECG power, the communication interface is responsible for restoring the information transmitted in the PKM power wave and providing it to the original ECG, and a controllable filter is responsible for returning the flow of information. Similarly, as shown in Fig. 12(b), the architecture of the new ICD is obtained by adding an expanded circuit to the original ICD. Naturally, LED lights or power loads (such as motors) can be directly replaced with traditional ECGs to reduce costs. The revised circuit structure of the complete system platform is shown in Fig. 12(c). Figure 13 shows the modified DALI control platform architecture. Its only difference from Fig. 12(a) is the potential output mode between the PKM power waves. In the architecture shown in Fig. 12(a), the output is 0 V. Therefore, the PKM power wave does not have a DC component to avoid magnetic-field saturation and prevent mechanical overheating of the motor. The PKM power waves output in the NRZ pulse wave mode can replace the DALI bus to extend the distance or increase the power limit by using the traditional transformer to adjust the voltage level as shown in Fig. 14. The bridge rectifier circuit in Fig. 13 outputs a high-level voltage to provide stable DC voltage and power. Figure 15 shows the operating program of the modified DALI control platform. To achieve related actions, it is mainly divided into three parts: T s , T t , and T r .

Control program strategy
(1) T s : During this program time, as shown in Fig. 16, the new ACH is responsible for transmitting the test packet shown in Fig. 9, and the new ECG is used to determine the value of γ transmitted. The default will only appear after the system is newly added to the device, and it does not normally need to appear. (2) T t : During this time, as shown in Fig. 16, the ACH or the new ICD is responsible for transmitting control information. (3) T r : During this time, as shown in Fig. 17, the new ECG is responsible for returning information to the ACH or the new ICD.   To enable compatibility with the DALI bus, the power line is used to simultaneously transmit control commands for two-way communication. As shown in Fig. 11, the new ECG uses the PKM power wave to control the power, and the current pulse signal generated simultaneously is sent back to the ACH. As shown in Fig. 18, the PK decoding function of the filter and communication interface must be canceled so that the information can be communicated using the ACH receiver by sensing the returned current signal. As shown in Fig. 19, the PK decoding function of the filter is activated so that the PKM current flows only in the new ECG, and the ACH can transmit commands to the PKM bus.

Results
Figure 20(a) shows the system platform hardware, which consists of a power supply, an Arduino Mega2560 board (marked C), an L298N high-power driver module for driving the PKM bus to a large load (marked B), and a Hall element module (marked A) to form an ACH, in which a Hall element is used to track the current of the load. In the test platform, the DALI bus was replaced with the PKM bus. In accordance with Figs. 12(a) and 12(c), two additional PKM communication interfaces are added. The existing ECG packaged by the expansion board of the  filter and rectifier becomes a new ECG. The new ECG reduces the cost and directly drives the 12 V DC motor load (the motor parameters are shown in the appendix). As shown in Fig. 14, using the PKM bus instead of the DALI bus can change the voltage to control the power flow, proving that this architecture is suitable for carrying a large load. Figure 20(b) shows that the new ECG element replaces the LED light with a DC motor load to simulate driving a modified   DALI system as a test platform. In addition, a PC, a signal capture device, and MATLAB® are added as a test platform. Simultaneously, an oscilloscope displays the waveform corresponding to the PC waveform. Figure 21 shows the PKM power waveform modulated using the ACH, which replaces the traditional DALI bus voltage and monitors its waveform using a wave device. The PKM power wave hides the transmission packet format shown in Fig. 4(b) using MATLAB in a PC. By sending one byte, "a" → (01100001) 2 , at a time to the PKM bus and the new ECG, the packet is sent back to the ACH using the method shown in Fig. 11, and the data is recorded and analyzed using the PC. Figure 22 shows the accuracy of PKM communication when the data "a" was transmitted from the ACH with various delay times to evaluate the accuracy at the specified ECG after transmitting 100 times to the PKM confluence at each delay time. The waveform of the PKM bus voltage input from the new ECG at a distance of 5 m is detected, and the data received back from the new ECG is recorded using the PC to calculate the accuracy of the PKM communication in the DALI system. Figure 22(a) shows the waveform of the PKM power wave monitored using an oscilloscope and Fig. 22(b) shows the correctness of the data transmitted from the ACH to the ECG. According to Fig. 22(b), below a delay time of 60 ms, the accuracy decays rapidly from 100 to 0%, indicating that the Arduino Mega2560 can guarantee correct communication within the maximum execution bandwidth. Figures 23(a) shows the current waveform of "a" sent back from the load during time T r . Figure 23(b) shows the correctness of the returned data PK decoding process from the current waveform. The new ECG receives the power and data from the PKM bus and drives the motor when the PKM power wave is modulated by a different frequency f s of the pulse wave at the ACH and transferred to the PKM bus. The current of both the LED lights and the drive motor is  transmitted back to the ACH, which is captured using the Hall element and shapes the waveform on a PC screen. The data after PK decoding is compared and its accuracy statistics for 1000 trials at each pulse-wave speed are calculated. The load side of the new ECG also uses a PKM power wave to replace the traditional PWM power wave, and the current waveform increases the communication capability of the returned signal. (8,9) Figure 24 shows that during time T t , the RZ pulse is used to modulate the PKM power wave, and during time T r , the feedback signal generated on the load side of the new ECG increases with f s , and the voltage amplitude decreases slightly. By capturing the voltage waveform of the new ECG connected to the PKM bus, the returned data can be demodulated. This provides a communication channel between the new ECG and the ICD in close proximity. The specified ECG sends back data using the current-driven electrical load passing through the ACH as a communication channel. However, the transformer is an inductive conversion element; thus, the phases of the voltage and current will become different as a result, but this will not reduce the accuracy of PKM power wave communication. The above experimental data proves that PKM power waves can simultaneously provide power and communication channels. The communication parameters do not need to be set, filters along the line can be simply designed using passive components, and the accuracy is also reasonably reliable. Moreover, the PKM bus is compatible with the existing DALI equipment, improves transmission power, and efficiently solves the shortcomings of the DALI system, which need to be solved urgently.

Conclusions
Bus communication is implemented in the proposed platform so that it is compatible with the traditional DALI bus. However, the noise distribution of Manchester encoding changes randomly, which easily interferes with the surrounding communication. It is difficult to design passive filters while limiting the power and control distance of the DALI control platform. Although the IEC 62383 protocol also provides an additional serial communication interface in addition to using the DALI bus communication function, to solve the above problem, the baud rate and communication packet parameters must be set if a serial communication interface is used. In fact, this only completes half of the automatic control function; instead of a DALI bus providing power, it is provided using a regional power source to reduce electromagnetic interference problems caused by the DALI bus. However, the PKM bus used in this study can be made compatible with existing DALI equipment by adding an expansion board. A Hall sensor was used to obtain the current flows through the DALI device as a communication channel to establish a bidirectional communication system. Improving the capacity limit of the DALI bus is the main contribution of this research. If bus power line communication is not used, PKM communication technology can still be used for serial communication. Not only can it completely replace the traditional serial communication technology, it also does not require setting steps when communicating and can complete automated communication without setting any communication parameters. This is another contribution of this research.