Download presentation
Presentation is loading. Please wait.
1
Automatic control systems V. Discrete control
2
Discrete control Nowadays the microcontroller is the most important components of all controllers. To convert the measured signal to sampled data requires analogue digital converter ADC and to create analogue action signal from the calculated data needs digital analogue converter DAC. The ADC and the DAC operate at the same time in every sampling period. To hold the sampling and counting data to the next sampling date is also very important for correct operation. The most important term: sample period TS, sample rate ωS, discrete signal for example u(kTS), where k is integer. It is often written simple u(k).
3
Sampling Process Contain the actuator and transmitter Continuous variables S T Control task Contain the error detector Differentia equitation u(t) DAC ZOH Zero order holder S T yM(t) ADC The sampling causes an additional dead time in the closed system. The ZOH holds the last value until the next sampling. The measured signal holder is a memory register handled by the control task. 3
4
Sampling effect We assume an ideal sampler represented by an impulse train. yM(t) yM(kTs) Ts 2Ts kTs t
5
Frequency spectra of sampled signal
The Laplace transform of the impulse train: Using the convolution integration rule: Involving the formula and replacing “s” to “jω”: The sampled signal contains many new frequency which distorts the original frequency spectra. These frequencies belong to the ωS.
6
Shannon’s sampling theorem
The original continuous signal can be reconstructed from its sampled signal by TS period, if the original continuous signal is band limited with ωL limit frequency and the sample frequency ωS, which is twice higher than limit frequency.
7
Real process signals Unfortunately the real process signals are not band limited and the real low-pass filter is not ideal one too. It is clearly visible on the figure above, the filtered signal loses components and contains components deriving from the periodically repeating spectra. These components distort the spectrum of the filtered signal. The lost components and the components which belong to ωS roughly cancel each other only the higher (2ωS, 3ωS, ..) distort the spectra.
8
The amplitude error from sampling
The amplitude error ES from the previous figure: Assuming a pure first order tag and Replace the integral tags the absolute value.
9
May be regarded as continuous range Table 1
10
Amplitude error of sampling
The amplitude error caused by 11 bit ADC is 0.49e-3 and the DAC is equal. Together they cause 0.98e-3 error. The amplitude error of choosing the sample time as the sum of time constants of process field is divided by one hundred plus amplitude error of converters is less than 2 thousandth except of only the first order system. The amplitude error of the PT1 first order system is higher than one hundredth even if the sum of time constants of process field is divided by 150. In other world it is the border of regarding as continuous a system.
11
Phase error of sampling
The sampling causes an additional delay time in the closed loop. It doesn’t affect the amplitude of open-loop transfer function, but modifies the phase shift, at the gain-crossover frequency. This decreases the phase margin and so modifies the quality parameters of the closed loop. One designs a system based on transfer function of process field or step response he can take into this when define the controller gain. If the open-loop frequency response is known, then using the allowable changes of phase margin one can determine the sampling time as:
12
Be regarded as discrete system Table 2
13
The range of the discrete systems
The amplitude error caused by 11 bit ADC is 0.49e-3 and the DAC is equal. Together they cause almost 0.1% error. The first row in the Table 2 is the same as the third row in the table 1. The PT1 first order system must be regarded as discrete, but the PT3 system can be regarded as continuous. If the amplitude error is higher than 5% then difficult to reach a good quality response of the closed loop. In reality isn't enough that the system working well in the measured point only!
14
Block manipulation isn't true the next:
In the z domain isn't true the next: Only the resulting of the transfer function between two sampler can be trans-formed to Z form! G1 G2 G1G2 G1 G1+G2 G2 G1 G2
15
The Z transform from s domain
There is a sampled signal: The Laplace transforms this signal: Replacing the exp components: where The Z transform: 15
16
Z and inverse Z-1 transforms
The Z transform: However this definition make only sense if x(z) is converges. The most discrete functions convergence can be enforced. Many power series has closed form however to find it is often difficult. The inverse: In the practice we often use the next table to execute the Z transform or inverse Z-1 transform, because to involve the formulas above is very difficult.
17
Some often used function L and Z form Table 3
18
Rules of L and Z transform Table 4
19
Zero order hold The execution of the control task needs time and during the execution necessary hold the last result. The ideal zero-order hold is TS wide impulse with unit amplitude. The Laplace transform of ZOH: The z-transfer function is the relation between the Z transform of sampled output and the Z transform of sampled input. The z-transfer function equals the Z transform of the process field and a zero order hold in cascade.
20
The Z transform from transfer function
Between the two samplers there are the process field with zero-order hold in one direction: An other direction there are the compensator with ZOH: 20
21
The Z transform from differentia equation
The general form of differential equation: All differential equation can be converted to differentia: 21
22
The Z transform from differentia equation
Replacing the differentia equations and arranging: Execute the Z transform: The Z transfer function: 22
23
Compare continuous and discrete systems 1
Example: Compare continuous and discrete systems 1 MATLAB command to convert to discrete from continuous is: c2d(cG,TS) The command contains the ZOF 23
24
Compare continuous and discrete systems 2
Example: Compare continuous and discrete systems 2 From the first row of table 2 the system is considered as continuous. ZOH The sampling doesn’t distort uniformly the quality parameters! 24
25
Compare continuous and discrete systems 3
Example: Compare continuous and discrete systems 3 ZOH The sampling distorts the quality parameters! The real process filters the signal and the response seems continuous with dead time. 25
26
Conclusion of example Such that the sampling doesn’t distort uniformly the quality parameters, therefore the Table 1 first or second row is the good choice, if we want to consider the system as continuous. The first order system is the problem. In the reality a system can be regarded as almost PT1, if the following ratio of their time constant is true: If the system has to be considered as discrete then the result of the methods of continuous compensation can be used regarding the TS sample time and the effect of gain and phase error. 26
27
The GPID (z) from GPID(s)
There are two general form of GPID(z). The Matlab default is the second. The parameters of GPI(z) if: The parameters of GPDT(z) if: 27
28
The GPID (z) from GPID(s)
The parameters of GPIDT(z) if: where: The GPIPD(z) if an ideal PD and a PI are in serial: where: 28
29
Compensation of hybrid system Discrete compensator and analogue process field
Situation: We know the step or the frequency response of the process field, and can design the compensator as continuous, but the required sample time isn't possible. 1. We design the compensator in time domain and this and the process field are converted to the z plane. 2. We convert the process field to the z plane, then design the compensator: * Using cancellation the highest poles of process field * Using Deadbeat compensator 29
30
Some used Matlab command
Where: Ts sample time, “cm” numerator of continuous transfer function, “cn” denominator of continuous transfer function, “dm” numerator of discrete transfer function, “cn” denominator of discrete transfer function, “cG” continuous transfer function, “dG” discrete transfer function. Convert to discrete from continuous Convert to discrete from continuous Plot discrete Bode diagram Convert from roots to vector Simulate the real time response, where t═0:Δt:tfinal Convert to discrete from continuous Provide the zeros, poles, and Kzp gain 30
31
Compensation of hybrid system Example 1: According to continuous system
Situation: We design the compensator in time domain and the process field and compensator transfer functions are converted to the z plane. Assuming that we have the frequency response. The Matlab command of the design steps there are in the example1.m) 1. Examining the Bode plot we choose type of controller (Be PIDT) 2. Determine the TI, TD, and T parameters from Bode plot! 3. Plot the open loop transfer function with KC═1! 4. Chosen the pm═60° determine the required KC! 5. Check the result, and determine the required sample time, where the system can be regarded as continuous. 6. Such that we can compare the response of discrete an continuous systems, plot the step response of the closed loop! 7. Choose a sample time and convert the function to “z” plane! 8. Plot the step response of the closed loop! 31
32
Determine the parameters according to Takahashi
33
Tuning rules for PID controllers
The process field‘s parameters: The control algorithm‘s parameters: Tuning rules based on measured step response. 1. With increasing Tu/Tg, than the KC gain decreases, the cD lead factor increases, and the cI integration factor decreases. 2. With increasing TS sample time, then the KC gain decreases, the cD lead factor decreases, and the cI integration factor increases. 3. With decreasing overshoot, than the KC gain decreases, or the cI integration factor decreases. 33
34
Compensation of hybrid system Example 2: Pole – zero replacement
Replace the two highest poles of process field for the zeros of the numerator of the compensator. We use the pz form of the compensator and the process field too. The process field: The compensator in general: The PIPD compensator is the most popular as cancellation poles:
35
Compensation of hybrid system Example 2
Situation: We design the compensator in “z” domain. Assuming that we know the discrete transfer function of process field. (The Matlab command of the design steps there are in the example2.m) 1. Create the discrete transfer function of process field with the appropriate sample time. 2. Determine the maximum and the second maximum poles of the this! 3. Create the required numerator of the compensator! 4. Determine the denominator of compensator! If we use a PI and an ideal PD in cascade it is easy. 5. Plot the open loop transfer function with KC═1 and determine the KC at the chosen phase margin! 6. Plot the step response of the closed loop! 35
36
Compensation of hybrid system Example 3: Deadbeat
We assume: The unit step response of closed loop and the action signal in the closed loop reach the final value during “m” steps The transfer function of process field: The transfer function of closed loop and controller: 36
37
Compensation of hybrid system Example 3: Deadbeat
Follows the previous page: where: The process field: 37
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.