Professional Documents
Culture Documents
Chapter 3
Implementation
1.1 Working
The overall working of the circuit will be defined in this section.
The microcontroller used in this project is Arduino Nano 3.0 This micro controller
provides good processing speed with sufficient peripherals to achieve the task.the
clock frequency is 16MHz.
Using Arduino Nano 3.0, we generate PWM pulses at 68KHz which is the natural resonant
frequency of the tank circuit. These PWM signals drive the MOSFETs to produce a square
wave signal at the output of the inverter. Inverter maps the input PWM signal on the
output. Microcontroller is isolated from the circuit using optocoplers. A dead time of
1.3µsec is inserted between the complementary signals.
The power provided by the inverter is coupled via coupling transformer and fed into the
LC tank in which the coil acts as the coupling transformer secondary coil. The waveform
achieved across the tank circuit is sinusoidal in nature. After the power has been coupled,
27
Chapter 3 Implementation
we insert the work piece into the work coil. High frequency current passing through the
coil gets coupled with the work piece and induce eddy current which results in heating the
metal piece.
The circuit in fact behave much like a transformer. When primary coil if coupling
transformer is energized with no work piece inside the coil, it behaves like a short circuit
so large no load current flows through the inverter. When there is a work piece, the value
of the current falls.
The problem in the system comes when the work piece is inserted in the work coil and
further when it starts to heat. The addition of a work piece in the system reflects an
inductance on the tank circuit and effectively changes the resonant frequency.
In our project, we track the changes resonant frequency in real time and keeps updating
the system on new Fr to provide optimal condition for the system.
3.1.1 Timers
Microcontroller Arduino Nano 3.0 has 14 times out of which TIM1 and TIM8 has the
capability to provide the complementary PWM signals with addition of dead time. TIM1 is
configured on PWM mode to provide signals on dedicated pins of channel 1 (PA8) and
its complementary channel 1N (PB13).
Timer 2 has been conditioned on achieving the time difference between the zero
crossings of the waveforms coming from tank capacitor voltage and inverter voltage. At
resonance, the phase difference between them should be 90 ͦ. The inverter waveform is
the same as PWM signal.
Timer 3 is a 1KHz time which takes on the value of PID to ensure that the system has
completely update itself.
28
Chapter 3 Implementation
29
Chapter 3 Implementation
30
Chapter 3 Implementation
31
Chapter 3 Implementation
With the work piece inside the coil, we need to decrease the operating frequency to bring
the system back to resonance. We devised the logic that if the system is already made to
run at frequency less than the resonance frequency, then if work piece added to the work
coil, it takes the system to resonant frequency because the operating frequency was
already less.
We verified the characteristics of the circuit as series resonant circuit and also analyzed
the behavior of the circuit with the help of isolated channel Oscilloscope. This helped in
better understanding of the problem that was occurring when work piece was inserted in
the coil. We observed that the frequency of the tank circuit remained the same but there
was and additional phase shift added in the waveforms of the tank capacitor voltage and
inverter voltage which at resonance must stay at 90 degree apart.
32
Chapter 3 Implementation
The figure attached below shows a system that was made to running at a frequency lower
than resonant frequency such that inverter voltage and capacitor voltage are almost in
phase with each other.
Now it was evident that the addition of workpiece will change the phase difference
between the waveforms but how much effect will be there was a question. It was found
that with different work piece like screwdriver, pliers, iron rod and nut, the effect was
different and it depended upon the shape and type of the work piece. The waveform below
shows when the work piece chosen to be a plier was inserted in the work coil. It has taken
the phase difference the waveform to approximately equal to 90 degrees which occur at
resonance
33
Chapter 3 Implementation
34
Chapter 3 Implementation
35
Chapter 3 Implementation
3.3.1 Proportional
Proportional as the name suggest is a synonym for gain. It is the easiest parameter to
play around. They gain factor is multiplied with the error to result in the proportional factor.
A large value for proportional controller means that the system will try to reach the
steady state quickly and will perform this behavior for slight error as well. This quick
response of the system may be desirable but it leads to overshoots in the system. So
rather than stabilizing the system, it adds jerking effect in the system.
Proportional = KP * Error
36
Chapter 3 Implementation
Example
It terms of real world around us, take an example of an oscillating pendulum. The greater
the force applied oscillations on the pendulum, the more quickly it will reach the center
point and greater will be the oscillations or overshoots due to inertia. The same case
happens in feedback system as well.
However too little a value of the proportional factor means that system will take much
longer to reach the steady state point avoiding over shoots. This may not be desirable
because if the time is much longer, the system may fail to pick it up and bring it to stability.
3.3.2 Integral
Integral is also termed as accumulation of error over a period of time. The error can be
negative or positive so the output of the integral can increase or decrease depending on
the state of the system.
Slowly, the value gets larger until the integral term is finally large enough to matter. The
purpose of integral controller is to eliminate the steady state offset. If the error is large,
then the integral will drive the controller output to change fast. The speed at which the
controller response is depended on the integral time value setting. If the time value is
large, the response will be sluggish otherwise the system is subjected to oscillatory
response avoiding overshoots.
Integral work by adding a lag in the system and damping the overshoots. The occurrence
of overshoot contributes a large value to the system which is the drawback of integral
controller.
37
Chapter 3 Implementation
38
Chapter 3 Implementation
3.3.3 Derivative
Derivative term is the rate of change of error with respect to time. It work by adding a
phase load to the system. The behavior of derivative is predictive. It is calculated by taking
the difference of the current error with the previous error. It helps to settle the system
quickly and avoids overshoots.
𝐝𝐢
Derivative factor = Kd *𝐝𝐭
So as a whole, PID controller helps in setting the system to steady state in relatively
less time.
39
Chapter 3 Implementation
The approach to achieve this task may be different. The addition of proportional controller
tries to bring the system to the newly offered resonant frequency quickly by setting a large
value for proportional factor but this alone cannot help us to achieve all the desired
behavior since a large proportional factor results in large overshoots.
To provide the system with the ability to offer less oscillations, we may use integral
controller and bring the system steady state but using an integral controller offers lag in
the behavior. Since, we desired for the system to quickly respond to new resonant
frequency, the use of integral controller was neglected.
The derivative controller comes into the action for providing less oscillations and as well
as the predictive behavior for induction heater. When the work piece is inserted in the
coil, the error offers a large value so the derivative terms is large and hence the next
corresponding values are also large. This offers sustaining behavior to the system to bring
it.
40
Chapter 3 Implementation
41
Chapter 3 Implementation
This shows that whenever the two signals are out of phase or at different voltage levels
the output of the XOR gate is high. It helps us to obtain the phase difference between
the signals. The XOR gate is implemented within the microcontroller with pins PA2 and
PA3 configured as input GPIO. The phase difference is obtained and timer 2 calculates
the pulse width.
REF input
Feedback
Output
42
Chapter 3 Implementation
43
Chapter 3 Implementation
44