|Feb15-12, 03:43 AM||#1|
Nonlinear Control problem
I've been looking at nonlinear control system and fuzzy control in particular.
If I simply want to do trajectory control (have the system to follow a certain trajectory in phase space), can I use much simpler local linear control?
I mean, for each point in phase space, do a local linearization and find the local linear control transfer function, as long as the system stay close to the intended trajectory this would work right?
|Feb24-12, 12:04 PM||#2|
What to you refer to by "phase space"?
And yes linear controllers usually can be used successfully within certain limits on nonlinear systems.
Most real systems are nonlinear, some much more so than others.
|Mar19-12, 09:49 PM||#3|
First the trajectory setting.
It is easier to follow a trajectory if the path has the following conditions:
1.- position follows a continiuos function through the path. lets say x=f(x).
2.- speed function is continous in the segment, then df(x) continous
3.- aceleration ddf(x) is continous.
this will prevent from trying to follow a difficult or impossible trajectory.
Choose the input variable to use as control input. Usually we use time in order to decide the position. This would mean that time will be use in order to find the error, and you will have some errors in position. perhaps you want to input position and try to accomplish the positioning in the time required, giving you errors in time and no in position. I usually use position rather than time because I prefer to have erros in time and no in position.
If you can create a plant or function on what "should" be the inputs in order to follow the trajectory (Output), use it as the main entrance, then add a PI controll and you will have a good result.
|Mar20-12, 11:03 AM||#4|
Nonlinear Control problem
I have been trying to solve an optimal control problem that needs a code written for it.I have used the forward RK 4th order method (for the state variable) and backward RK 4th order method (for the adjoint equation) but the results I obtained are not right.I am saying this because the article I found the problem from includes the graph of the solution which is nothing like mine .Now I want you to help me find the bug if any or suggest a better algorithm.
Here is the Fortran code:
real :: h,n,k1,k2,k3,k4,l1,l2,l3,l4,dz,deta,tol
u(1)=0.05;n=1000.00;t(1)= 0.0;z_1=0.1033; z_2=31.5502
t(1001) = 5.0;eta(1001)=0.0;h=(t(1001)-t(1))/n;tol=0.001
w(1)= (phi_1 + phi_2 * (z(1)**gama))*z(1)/(g_1 * z(1) + g_2)
!The header of the output
!201 format (2f10.6,2f10.6,2f16.6,2f10.6)
!do i = 1,1001
!Do loop of Runge-Kutta fourth order forward method to get state variable
do i = 1,1001
do j = 1,1001
k1 = h*dz(t(j),z(j))
k2 = h*dz(t(j) + h/2.0,z(j) + k1/2.0)
k3 = h*dz(t(j) + h/2.0,z(j) + k2/2.0)
k4 = h*dz(t(j) + h,z(j) + k3)
!The values of z will be calculated
z(j+1) = z(j) + (k1 + 2.0*k2 + 2.0*k3 + k4)/6.0
t(j+1) = t(j)+ h !Getting set the time for the next iteration
w(j+1) = (phi_1 + phi_2 * (z(j+1)**gama))*z(j+1)/(g_1 * z(j+1) + g_2)
end do ! for z
!202 format (2f10.6,2f10.6,2f10.6,2f10.6)
!Do loop of Runge-Kutta fourth order backward method to get adjoint variable
do k = 1001,1,-1
l1 = h*deta(t(k),z(k),eta(k))
l2 = h*deta(t(k) - h/2.0,z(k)+A(k)/2.0,eta(k) +l1/2.0)
l3 = h*deta(t(k) - h/2.0,z(k)+B(k)/2.0,eta(k) + l2/2.0)
l4 = h*deta(t(k) - h,z(k)+ C(k),eta(k) + l3)
!The values of lambda will be calculated
eta(k-1) = eta(k) - (l1 + 2.0*l2 + 2.0*l3 + l4)/6.0
t(k-1)=t(k)-h !Getting set the time for the next iteration
end do !for eta
if (eta(i) .lt. (g_1/g_2)) then
u(i) = u_1
else if (eta(i).eq.(g_1/g_2)) then
if (z(i) .le. z_1) then
else if (z_1 .lt. z(i) .and. z(i) .lt. z_2) then
end do !for u
!======================================= saved slopes
!if (abs(x(i)-x(i+1)) + abs(u(i)-u(i+1))+ abs(lamd(i)-lamd(i+1)) .lt. tol )then
201 format (2f10.6,2f10.6,2f16.6,2f10.6)
end program opct
dz = -(phi_1 + phi_2*(z**gama))*z + (g_1*z + g_2)*u(1)
end function dz
deta = ( phi_1 + (1-gama)*phi_2*(z**gama))*eta + g_2*u(1)*(eta-g_1/g_2)*eta-(gama*phi_2/(z**(1-gama)))
end function deta
Thanks a lot!
|Similar Threads for: Nonlinear Control problem|
|Nonlinear Dynamics: Nullclines and phase plane of a nonlinear system||Calculus & Beyond Homework||1|
|1st Order Nonlinear equation - Control||Differential Equations||1|
|Nonlinear least squares problem||General Engineering||0|
|Nonlinear control of inverted pendulum||Mechanical Engineering||0|
|Nonlinear Control||Engineering Systems & Design||2|