(page originally posted 17 Feb 2002, updated 25 Feb 2002)
I have been working on the motor/disc servo for my mechanical receiver for the past two months (very intermittently), and now have a working circuit using a Pulse-width modulator (PWM) for the motor speed control. The circuit uses a power FET to drive the motor single-ended. A bridge does not seem necessary, although it is still on my list to try one. The FET gets slightly warm and does not seem to need a heat sink. The circuit is here for those who would like to experiment.
Since I had already built a line-rate (400 Hz) saw-tooth generator (555 timer chip plus transistor) for displaying the signal on an oscilloscope, I used this saw-tooth to derive the pulse-width variation. This saw-tooth oscillator is triggered by the sync for oscilloscope display, but this is not required for the pulse-width modulator.
A major concern was to prevent 400 Hz components at the output of the phase detector from reaching the PWM.
If the 400 Hz from the phase detector meets the 400 Hz saw-tooth in the PWM, the PWM acts as an unplanned phase
detector itself. It turns out that the need to attenuate high frequencies is in direct conflict with the requirements
for the loop, in which the motor and disc represent a huge lag term (inertia) that must be compensated so that
the loop does not oscillate. The compensation is a lead term, with response rising at higher frequencies, which
would emphasize the 400 Hz components. Each stage of the compensating filter thus needs some additional high frequency
attenuation component added: a shunt capacitor for an existing resistor or a series resistor for an existing capacitor.
The problem then becomes that these added components disturb the phase of the signals, so that the loop does not
behave according to the classic linear theory.
It took many iterations of simulation to figure out a compromise design that attenuates the 400 Hz components and does not destabilize the loop. Along the way, I had to redesign several times to accommodate the dynamic range at each stage. For example, the PWM works on a saw-tooth waveform that goes from 1/3 supply voltage to somewhat less than 2/3 supply voltage. If the control voltage output of the loop filter goes beyond this range, the control action is clipped, behavior becomes "bang-bang", and instability can result. However, he control voltage should not cover less than this range, or the frequency-control features of the PLL chip may not be realized.
Besides theoretical detours, I also took some accidental ones: the output of my disc-sensing phototransistor was not a sharp enough waveform, resulting in erratic operation. Of course, at first I wondered if I had the wrong filter components. After I went back to the beginning of the loop and put in an op-amp Schmidt trigger stage, the loop suddenly locked up as expected (of course, dynamics still needed some adjustment). I may yet go to a QSE156 detector with logic output, as suggested in the club literature.
Once I basically had the loop working, I was able to test just how much high frequency attenuation was really needed. I also could experiment with the lead-filter compensation and pick values for best pull-in and response to a transient disturbance.
The physical apparatus now generally agrees with the simulations, with the exception that the time constant of the disc inertia and friction that is needed in the simulation seems to be different from what I have measured. I have tried two ways to measure the disc/motor time constant, and get different answers that bracket the value used in the simulation that give comparable closed loop transient effects.
One way I measured the disc/motor was to apply a fixed control voltage to get nominal speed, and time the disc acceleration from zero to 63% of nominal. I also timed the deceleration, since the braking may be different from the acceleration. At this time I had resistors in parallel with the motor to get better braking. By this method, I measured a time constant of 12 seconds. A second method of measuring the time constant is to apply a control voltage that steps +/- 0.5 volts around the nominal (where the full range is about 3.5 volts). With this method, the time constant seems to be 2.5 to 3 seconds. However, when I simulate the apparatus on the computer, a time constant of 6 seconds is required to show the same frequency of damped oscillation when the loop is disturbed (about 3 Hz) as the real apparatus.
Added February 25, 2002: The motor time constants needed more investigation. I have since changed to having 50 ohms in series with the motor to center the pulse-width at 50% duty cycle. Measurement of the time constant by stepping the control voltage now shows a 6-second time constant for acceleration and 7 seconds for deceleration. The 2.5 to 3 seconds figure seems to have been a mistake. Coasting by disconnecting the motor shows a time constant of 10 to 11 seonds. Braking by shorting the motor shows a time constant of less than two seconds, perhaps less than 1.5 seconds. These results are not only consistent with the simulation, but are in the right progression for various amounts of electrical damping. The winding measures about 20 ohms. The total resistance when the FET is conducting (50% of the time) is 70 ohms, and the other 50% of the time it is infinite. So, one expects a ratio of electrical damping of about 70x2/20 or 7:1 for the driven and shorted cases. If the open circuit time constant is 11 seconds and the driven is 6 seconds, then the electrical damping component is 13.2 seonds. Multiplying this damping by seven times and adding it to the open circuit damping gives a short circuit time constant of 1.6 seconds, close to what is measured.
The other loop parameters that have to be measured or calculated are the phase detector gain KD, in volts/radian, and the motor/controller gain in radians/second/volt. The value of KD is given in the CD4046 spec sheet. The value of the controller gain, KO, is measured as the variation of radian frequency of the 400 Hz optical pulse for a 1 volt change in control signal. When these factors are known, the values for the compensating (lead) filter can be calculated to give a well damped loop response. As part of this, the phase detector output may be attenuated if the loop gain is too large. You can see a three resistor attenuator in the phase detector output of my circuit. However, the gain through the filter should be such that you can still exercise the full range of the PWM, otherwise the speed-control feature of this phase detector will not work. An additional criterion is that the PWM should be running at about 50% duty cycle at nominal speed in order to give symmetrical response for acceleration and deceleration. This could involve adjusting the supply voltage, or as in my circuit, using some resistance in series with the motor. The components you see are partially a result of several trials to meet these criteria along with not greatly exceeding the full range of the
saw-tooth in the PWM. Once dynamic ranges are satisfied, then the fun begins, trying to attenuate the 400 Hz components without wrecking the dynamic response.
(Click for enlarged view)
A circuit was developed that models all the essentials for a linear analysis, including the motor and phase detector. The circuit was further simplified by replacing the op-amp models with ideal voltage-controlled voltage sources. This eliminates the many unnecessary short time constants inside the op-amp model
A result of the simulation is here
The final circuit works well with my particular motor and disc. I would not predict performance with a different set of hardware without measuring the disc inertia, controller gain, and detector gain, and recalculating, or better re-simulating, the filter stage. An oscilloscope is a big help in figuring out where you went wrong if it doesn't work. However, in the spirit of "try it once, it might work", you might start with the values I have used in a solderless breadboard. Then, if the loop basically locks, try to tweak filter values for best transient response (fastest recovery and least oscillation) when the loop is disturbed by slowing the disc by hand.
The servo behaves as it should when using the "Type II" phase detector output of the CD4046. That is, it controls both disc speed and phase with no need for a nominal speed adjustment.
This means that it responds to the "missing sync" frame sync on the NBTVA CD, which signals frame sync by simply omitting the last line sync..
If all 32 sync holes are present in the disk, but the "signal" input to the phase detector is the 31/32 sync, then the disk locks up at 31/32 of the correct speed. This results in a slippage of 1 line per revolution, or 12.5 lines per second, or one frame per 2.56 seconds. In my first trial, this problem was solved by using the pulse output of the 400 Hz locked sawtooth generator instead of using sync directly. This gave correct line lock, but of course no frame lock.
The most recent experiment is to use the sync as the "signal" input, and cover one sync hole in the disc. The result is amazing and was unexpected: not only does the disk lock to the correct speed, it also locks to the correct frame phase (almost, within +/- 1 line). Now I am working to devise a simple way to take out the +/- 1 line deviation. Some sort of added circuit to detect the condition and give the loop a kick, perhaps.
I tried changing to a frame-only loop (1 pulse per revolution), but it didn't look promising. The loop gain is reduced by a factor of 32, making it very unstable (confirmed on the bench and in simulation). To get the required loop gain seems to require a huge and impractical dynamic range in the filter and motor control circuits. I believe this can be expected when the motor and disc itself are the major inertia (lag) terms in the loop. In an oscillator control circuit, the oscillator itself is essentially inertialess, and all the lag and lead terms and their ratios of response are internal to the filter, so the intermediate leading voltage point is never developed.
The results with one disc hole covered and with "missing vertical" sync input to the phase detector are here
Back to Mechanical TV Progress 2