Adjusting feedback gain in a fluorescent lamp dimming control
The present application is related to U.S. application Ser. No. 780,548, entitled &#34;Energy Management/Dimming System and Control&#34;, Alley et al., and to U.S. application Ser. No. 780,142, entitled &#34;Wall Box Fluorescent Lamp Dimmer&#34;, Alley et al., both filed of even date and assigned to the assignee of the present application, and both of which are incorporated by reference. 
     BACKGROUND OF THE INVENTION 
     The present invention relates in general to a fluorescent lamp dimming system and more specifically to method and apparatus for adjusting feedback gain in a dimming control which uses current as a feedback variable. 
     Much work has been done to achieve dimming of fluorescent lamps which are installed in connection with conventional, nondimming ballasts. Due to the large number of such ballasts in use, retrofit devices have appeared which connect in the power line to the ballast and condition the supplied power so as to controllably reduce the light output from the lamps. 
     Above-mentioned application Ser. No. 780,548 pertains to an electronic control and a control method for dimming fluorescent lamps. In that invention, the power supplied to the ballast is conditioned in a manner as was described in prior application Ser. No. 645,593 of Alley et al., filed Aug. 30, 1984 now U.S. Pat. No. 4,604,552 issued Aug. 5, 1986. In the prior application, it was disclosed that fluorescent lamps may be dimmed by lowering the duty cycle of the 60 hertz AC line voltage supplied to the ballast and that, at the same time, filament heating may be maintained by adding a high frequency voltage (at least ten times greater than the line frequency) to the ballast voltage. 
     The dimming control disclosed in application Ser. No. 780,548 uses ballast current as a measure of the light output of the lamps in obtaining closed loop feedback. Thus, by keeping ballast current at a nearly constant magnitude corresponding to a particular light level, a fairly consistent light output can be achieved even in the face of fluctuations in the power line voltage. 
     The ballast input current flowing at full lamp brightness varies depending on the specific lamps and ballast used. The dimming control preferably must be flexible enough to accommodate the variation of full load current from lighting system to lighting system. In addition to the variety of different lamps and ballasts which arise, the number of ballasts connected in a branch circuit varies. There is also the possibility that some lamps might not be functional and that some ballasts may simply be turned off. In order to use ballast current as a feedback variable, full load current for the particular lighting system must be approximated before it is actually flowing so that the feedback gain can be adjusted to normalize it with the other control parameters. Otherwise, current values could arise which overflow the control capabilities. 
     Accordingly, it is a principal object of the present invention to provide a method and apparatus for adjusting the feedback gain in a fluorescent lamp dimming control to a value which normalizes current feedback with the control constants. 
     It is another object of the invention to provide a method and apparatus for estimating the full load current of a fluorescent lighting branch circuit before full load current is actually flowing. 
     It is a further object of the invention to provide a fluorescent lamp dimming system which operates over a wide range of load sizes without any modification to the dimming control. 
     SUMMARY OF THE INVENTION 
     These and other objects of the invention are achieved by a method for estimating full load current for a fluorescent lighting system which comprises the steps of (1) turning on full power to the fluorescent lighting system; and (2) measuring the current flowing to the lighting system after initial transients decay and before the lamps of the lighting system begin conducting. An estimate of full load current can then be obtained by increasing the results of the measuring step by a factor of about two. 
     In another aspect of the invention, a method for adjusting the feedback gain of a fluorescent lamp dimming control comprises the steps of (1) turning on full power to the lighting system; (2) setting feedback gain to an initial value; (3) measuring current flowing to the lighting system after initial transients decay and before the lamps begin conducting, thus using the known feedback gain to obtain a measured current value; (4) comparing the measured current value with a control reference value; and (5) if the difference resulting from the comparison is greater than a predetermined value, then adjusting the feedback gain in a manner which causes the measured current value to approach the desired control reference value. This normalizes the control to the load. 
     The apparatus of the present invention provides adjustable current feedback in a microprocessor controlled fluorescent lamp dimming system. A current sensing means is adapted to be coupled to a fluorescent lighting system for providing a voltage proportional to the current flowing to the ballast of the lighting system. An adjustable scaling means is coupled to the current sensing means for scaling the voltage with an adjustable gain. The adjustable scaling means is adapted to be coupled to the microprocessor for receiving the amount of gain. A voltage-controlled oscillator means is coupled to the scaling means and provides a signal having a frequency proportional to the magnitude of the output signal of the scaling means. A counter means is coupled to the oscillator means for counting the pulses in the signal, the counted pulses representing the integral of the scaling means output signal. The counter means is also adapted to be coupled to the microprocessor for providing the results of the counting thereto. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The novel features of the invention are set forth with particularity in the appended claims. The invention itself, however, as to organization and method of operation, together with further objects and advantages thereof, may best be understood by reference to the following description taken in conjunction with the accompanying drawings in which: 
     FIG. 1 is a part schematic, part block diagram of a fluorescent lighting system with a dimming module connected thereto. 
     FIG. 2 is a waveform diagram of the current supplied by the dimming system during dimming. 
     FIG. 3 is a block diagram showing the dimming module of FIG. 1 in greater detail. 
     FIG. 4 is an oscilloscope tracing of current flowing to a fluorescent ballast during lamp starting. 
     FIG. 5 is a flow chart of the method of the present invention. 
     FIG. 6 is a block diagram of apparatus for practicing the present invention. 
     FIG. 7 is a flow chart of a method for practicing the present invention with the apparatus of FIG. 6. 
     FIGS. 8A and 8B are a portion of the software used by the apparatus of FIG. 6 to implement the method of FIG. 7. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring now to the drawings, FIG. 1 is a part block diagram, part schematic of a fluorescent dimming system for utilizing the present invention. A dimming module 11, for providing dimming in response to a command signal, is connected between an AC source 10, typically a 60 hertz power line from a distribution panel, and a conventional nondimming rapid-start fluorescent ballast 13 (an 8G1022W ballast manufactured by the General Electric Company is shown in the Figure). Ballast 13 powers series connected fluorescent lamps 18 and 19 and filament heaters 20-23 of lamps 18 and 19. Ballast 13 includes autotransformer 14, power factor correcting capacitor 15, starting capacitor 16 and filament secondaries 17a, 17b and 17c. 
     In previously mentioned U.S. Pat. No. 4,604,552, it was disclosed that lamps 18 and 19 may be dimmed by lowering the duty cycle of the low frequency AC line voltage during each half-cycle of line voltage and adding a high frequency component to the ballast voltage either continuously or during the off portions of the low frequency component in order to maintain filament heating. In the present invention, dimming module 11 also performs this function except that a current reference is substituted for the voltage reference for compatibility with the wall box dimmer described in application Ser. No. 780,142 and for allowing current to be used as a feedback variable. Thus, the input current waveform is chopped by dimming module 11 as shown in FIG. 2. A notch delay period 24 is measured from a zero crossing of current i to the beginning of a notch period 25. Current is chopped during notch period 25 to produce a series of high frequency pulses which provide power to filaments 20-23 but which make essentially no contribution to the light output of lamps 18 and 19. By varying the length of notch delay 24 and the width of notch period 25, a variable light output from lamps 18 and 19 results. The frequency of the high frequency pulses is preferably at least 10 times greater than the frequency of source 10. 
     One configuration of dimming module 11 for conditioning current i to obtain the waveform of FIG. 2 is shown in FIG. 3. A main switch 30 is connected in series with the ballast(s) and is adapted to be turned on when the lamps are on except during the notch periods when main switch 30 chops the ballast current at a high frequency. Control 31 controls the conduction of main switch 30 via a gate signal in response to a command signal, typically supplied from a remote location, and in response to a current signal fed back from main switch 30. A clamp circuit 32 is connected in parallel with the ballasts to limit the voltage across the ballasts which could otherwise rise to extremely high levels during rapid switching of the current supplied to the inductive ballast load by main switch 30. Examples of clamp circuit 32 are disclosed in U.S. patent application Ser. No. 677,413 of Alley et al., fi1ed Dec. 3, 1984, entitled &#34;Active Clamp Circuit&#34; which is also of common assignment. An EMI filter 33 is connected between main switch 30 and AC source 10 to reduce electromagnetic interference propagating from dimming module 11. 
     It is apparent from FIG. 3 that control 31 generates the gate signal (i.e. notch delay 24 and notch period 25) to produce a light output from the lamps which corresponds to the command signal. The command signal typically will vary in accordance with a desired light level (e.g. a percentage of full brightness) as determined by an operator or a central computer. However, actual light level is measured indirectly by sensing the current flowing to the ballasts which is for practical purposes proportional to light output. But since full load current for a particular circuit is not known prior to actual operation, it would be advantageous for control 31 to determine full load current for the particular lighting system so that actual percentage of full brightness may be computed from the current signal. Furthermore, it would be advantageous to determine full load current without full load current actually flowing to avoid overflow of the control variables in control 31 and to allow the lamps to turn on at less than full brightness. 
     The present invention takes advantage of a particular characteristic of conventional fluorescent lighting systems which will be described with reference to FIG. 4, which is an oscilloscope trace of full-wave rectified ballast input current with zero at the top and increasing current to the bottom of the trace. In taking the measurements of FIG. 4, two Watt Miser II® 40 watt fluorescent lamps manufactured by General Electric Company were connected to the ballast shown in FIG. 1. At t=0, full power of 120 volts, 60 cycles AC was turned on. By the end of the first 100 milliseconds the initial transient currents caused by turn on had decayed. Thereafter, peak current remained at a constant level until about 550 milliseconds after turn on, when the lamps started. Between about 200 and 500 milliseconds after turn on, peak current was about 0.6 amperes. After the lamps started, peak current (i.e. full load current) eventually stabilized at about 1.16 amperes, giving a ratio of about 1.9. There is some variation in the ratio of pre-starting current to full load current when the input voltage is changed. Voltage changes also affect the time at which the lamps start. Data for Watt Miser II® lamps and the 8G1022W ballast is summarized in the following table. 
     
         ______________________________________                                    
         Time to   Initial    Final                                       
Input Volts                                                               
         Lamp Start                                                       
                   Current    Current                                     
                                     Ratio                                
______________________________________                                    
110      1100 mS   0.48 A     1.2 A  2.5                                  
120      550       .6         1.16   1.9                                  
130      450       .78        1.15   1.5                                  
______________________________________                                    
 
    
     Starting times and the ratio of initial current to final current for other fluorescent lamp and ballast combinations are similar to those given in the above table. For example, Mainlighter™ lamps (a product of General Electric Company) connected to the 446-L-VLH-TC-P ballast from the Universal Manufacturing Corporation gave a ratio of initial current to final current of 2.14 when starting with 120 VAC supplied. In general, an approximate value for full load current can be obtained by doubling the initial current value. The initial current is preferably measured at any time or times between 100 and 400 milliseconds after power is turned on. 
     The approximate nature of the estimate of full load current still results in acceptable performance of the dimming system because of the inability of individuals to perceive small variations in light level. Furthermore, it is noted that the lumen output of fluorescent lamps is never perfectly constant due to temperature changes during lamp operation. 
     Turning now to FIG. 5, a method for adjusting the feedback gain employed by the dimming control is shown. Full power to the ballast is turned on at step 40. Feedback gain is initialized to a known value in step 41. Step 42 comprises a delay period during which initial transients decay. The delay is at least 100 milliseconds, a 130 mS delay being shown in order to allow for a safety margin. Next, current is measured in step 43 in a manner which depends on the latest feedback gain value. In step 44, a reference value, which is proportional to the constant which is representative of full load current (i.e. full brightness) as used by the control, is subtracted from the measured current. In a preferred embodiment, the reference value used for the subtraction is one-half of the constant which represents full load current, thus eliminating any need to double the result of the subtraction. In step 45, the error is tested. If it is sufficiently small then the gain value is correct and the control proceeds to other operations at step 47. If the error is too large, then step 46 is executed. In step 46, the gain value is adjusted to correct the error, e.g. if the difference is positive then the gain value is reduced and vice versa. Next, the algorithm returns to step 43. 
     Apparatus for a fluorescent lamp dimming control having adjustable feedback gain is shown in FIG. 6. A current sensor 50 senses the absolute value of current flowing through the main switch to the ballasts. The current signal from current sensor 50 is coupled to a multiplying digital-to-analog converter 51. D/A converter 51 is connected to a microprocessor 52 and to a voltage-controlled oscillator (VCO) 53. A timing means 54 is connected to VCO 53 and to microprocessor 52. Timing means 54 generates the gate signal. 
     Multiplying D/A converter 51 converts the current signal to a scaled value. The analog current signal is multiplied by a digital scale factor which has been loaded into D/A converter 51 by microprocessor 52. The result of the multiplication is an analog voltage which is a scaled current signal. Multiplying D/A converter 51 may comprise, for example, the AD7524 manufactured by Analog Devices of Norwood, MA. 
     VCO 53 generates an AC signal having a frequency proportional to the scaled current signal. A digital counter in timing means 54 counts the cycles in the output signal from VCO 53. The amount of counted cycles is proportional to the integral of the scaled current signal. This integral may then be compared with the reference value by microprocessor 52, which also then modifies the scale factor (i.e. feedback gain) of D/A converter 51. VCO 53 may comprise the VFC 320 oscillator available from Burr Brown of Tucson, AZ. Timing means 54 may comprise the AM9513 system timing controller available from Advanced Micro Devices. An example of a microprocessor suitable for demonstrating the present invention is the 8751 microprocessor from Intel Corporation. 
     Other digital counters in timing means 54 are used to generate the notch delay, notch width and high frequency pulses which make up the gate signal. Microprocessor 52 controls these digital counters to achieve a light output from the lamps corresponding to the command signal. A more detailed description of these aspects of the dimming control may be found in copending application Ser. No. 780,548. 
     FIG. 7 provides a flowchart of the method used by the microprocessor to adjust feedback gain. As described in application Ser. No. 780,548, current integrals are evaluated over each half-cycle of current and each zero-crossing of current generates an interrupt within the microprocessor. Upon entering an interrupt service call at step 60, the microprocessor checks whether the start-up gain adjustment routine has been enabled. The start-up routine will not be enabled until the 130 millisecond delay for transient decay has expired. If start-up is not enabled then other routines might be executed. 
     If start-up is enabled then an index pointer to a gain value table is fetched in step 62. Step 63 tests whether the end of the table (either smallest or largest possible gain value) has been reached. If so, then the main control routine is enabled in step 70, the gain adjustment routine is disabled in step 71, and the routine is exited in step 72. If there are more gain values left in the table, then the latest current integral measurement is fetched in step 64. The reference value is subtracted from the current integral in step 65. 
     In step 66, the result of the subtraction is tested. If it is not positive (in the case that the first gain value in the table is the largest and with successively decreasing gains), then a branch is made to step 70. If the result is positive then the table index pointer is incremented in step 67. After loading the new gain value in step 68, the routine is exited in step 73. 
     The portion of the software used by the microprocessor which is relevant to the method of FIG. 7 is shown in FIG. 8. The listing is from a printout generated by an MCS-51 Macro Assembler with the source program written for the Intel 8751 microprocessor and associated peripherals as described in application Ser. No. 780,548. A portion of the main program is shown which executes the 130 mS delay. After the delay, the &#34;B --  START --  ENABLE&#34; bit is set. As long as this bit is set, the interrupt service routine (not shown) will jump to the start-up current gain adjustment routine at each interrupt caused by a current zero-crossing. 
     Prior to the execution of the gain adjustment routine, the main program initializes &#34;V --  SF --  PTR&#34; to the gain value, and &#34;A --  I --  REF&#34; to the control reference which is about half the current command reference for 100% light level. &#34;I --  DAC&#34; is the address of the multiplying D/A converter. 
     The foregoing describes a method and apparatus for adjusting the feedback gain in a fluorescent lamp dimming control to a value which normalizes current feedback with the control constants. Full load current is estimated without that level of current actually flowing to the ballasts. Thus, the dimming system operates with a wide range of load sizes without modification. 
     While preferred embodiments of the present invention have been shown and described herein, it will be obvious that such embodiments are provided by way of example only. Numerous variations, changes and substitutions will occur to those skilled in the art without departing from the spirit of the invention. Accordingly, it is intended that the invention be limited only by the scope of the appended claims.