Inverse model for feedforward control
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Martin
el 10 de Jun. de 2024
Comentada: Martin
el 14 de Jun. de 2024
Hello,
I want to implement a feedforward control for good trajectory tracking (feedback path for disturbance rejection comes afterwards).
I determined the continuous transfer function to be:
The inverse of this is
(I know that this transfer function can not be realized in physical systems since, but I would hope that simulink lets me simulate the ideal system).
If I combine G^-1 and G in simulink, I would expect to obtain ideal trajectory tracking, because G^-1 * G = 1
However the following model only achieves ideal tracking, if I add a factor of 6 at the marked position. (R=3, L - 0.004, solver is fixed step ode4, 1e-4s stepsize)
Why do I need to add a factor of 6 there?
0 comentarios
Respuesta aceptada
Sam Chak
el 14 de Jun. de 2024
Hi @Martin
In my previous Answer, I used to Transfer Function (frequency version) to describe the process plant. I have revisited the problem and built a continuous-time version of the process plant model and implemented your proposed feedforward controller in Simulink.
Here, I have intentionally set the initial value of the current, , to 1 in order to assess how quickly the controller is able to drive the system's output to track the desired reference sine wave, .
From the Differential Equation form
,
the ODE is rearranged
to become the Integral Equation form
because the Integrand is the input signal to the Integrator block.
Figure 1: Block diagram
Figure 2: The actual current signal (yellow) quickly tracks the desired current signal (blue).
Más respuestas (3)
Sam Chak
el 11 de Jun. de 2024
Hi @Martin
Transfer function:
Math model in continuous-time:
This linear 1st-order ODE is 100% solvable and the ideal feedforward control law will be in the form of the Lambert 𝒲 function (but usually not taught in the first course in Differential Equations).
However, given that the RL circuit is stable and the value of the inductance L is relatively small, you can approximate the ideal feedforward control law simply as .
tspan = [0 0.1];
I0 = 1;
[t, I] = ode45(@RLcircuit, [0 0.1], I0);
plot(t, I), grid on, xlabel('t'), ylabel('I(t)')
%% RL circuit
function dI = RLcircuit(t, I)
% Parameters
L = 0.004;
R = 3;
% input Voltage
Vin = R; % Since L ≈ 0, G^{-1} ≈ R
% ODE
dI = (Vin - R*I)/L;
end
Sam Chak
el 12 de Jun. de 2024
Hi @Martin
As the target trajectory contains frequency components, a factor of 600, rather than 6, must be employed in this secondary solution to effectively track the sinusoidal target, which has a period of 1 second, or a frequency of 1 Hertz.
tspan = [0, 1];
I0 = [0; 0];
[t, x] = ode45(@RLcircuit, tspan, I0);
plot(t, [x(:,1), sin(2*pi*t)]), grid on, xlabel('t'), ylabel('I(t)')
legend('Actual I(t)', 'Desired I(t)', 'fontsize', 12)
%% RL circuit
function dx = RLcircuit(t, x)
% states
x1 = x(1); % current I(t)
x2 = x(2); % internal state
% Parameters
L = 0.004;
R = 3;
K = 600; % tune this parameter only!
% input Voltage
ref = sin(2*pi*t); % sinusoidal reference signal
err = ref - x1; % error
Vin = 1*x2 + K*L*err; % input Voltage signal
% ODE
dx = [(Vin - R*x1)/L;
K*R*err];
end
Sam Chak
el 13 de Jun. de 2024
Hi @Martin
Thanks for your feedback in the comment. The provided first-order ODE:
,
suggests that the "pure" feedforward control voltage signal could be designed as:
.
This approach would theoretically compensate for the transient behavior by accounting for the time derivative of the current. However, while you can pull this off in Simulink, accurately measuring the time derivative of the current may present practical challenges that would need to be addressed in the real-time implementation.
Figure 1: Block diagram
Figure 2: The desired current signal (blue) perfectly overlaps with actual current signal (yellow).
0 comentarios
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!