# Deducing single wing plane transfer function Aka Transfer function estimation through set of points

I'm trying to control a plane via roll using PID controller ,

I had a problem finding the transfer function thus I used the following method :-

Fix the plane in an air tunnel

change the motor that controls the roll in fixed steps and check the roll

thus I will have a table of roll/motor degree

next is to deduce the nonlinear function using wolfram alpha or approximation neural network .

Is this a correct method or should I try another method ?

For your PID to work properly, you need to be able to make a somewhat linear conversion of error (desired roll vs actual roll) into corrective force (in this case, provided by the control surfaces -- the aileron angle, influenced by air speed and other factors).

The $k_d$ term of your PID should account for the inertia of the plane in rolling from side to side, so don't worry about that in your measurements.

What you should measure in your wind tunnel tests is the torque on the longitudinal axis of the plane, in response to airspeed (in both X and Y axes, if you have on-board sensors for that) and aileron angle. That will provide data on the following relationship:

$$\tau_{actual} = f(\theta_{\text{aileron}}, \text{airspeed}_x, \text{airspeed}_y, \text{[other measurable factors]})$$

You are going to approximate the inverse of that function -- finding $\theta_{\text{aileron}}$ given $\tau_{desired}$. Whether you do that with a neural network, wolfram alpha, multivariate regression, or a good knowledge of physics is up to you. In the end, you want to produce a modeling function in this form: $$\theta_{\text{aileron}} = f(\tau_{desired}, \text{airspeed}_x, \text{airspeed}_y, \text{[other measurable factors]})$$

The PID will give you $\tau_{desired}$, and your sensors will give you the other factors to plug into this function.

• Can you explain more ? more details – RoboMan Sep 28 '14 at 7:09
• Details on how the PID works, or on how to write the modeling function? – Ian Sep 28 '14 at 13:44
• Modeling function , I understand PID very well , what I don't get is the test you mentioned above and expected results Thanks for your time ! – RoboMan Sep 28 '14 at 13:47
• You were on the right track in your original question -- you would use a neural network or some other kind of multivariate regression to find the function that produces your desired aileron angle. Your experimental setup and torque measurements will produce data according to this function: $\tau_{actual} = f(\theta_{\text{aileron}}, \text{airspeed}_x, \text{airspeed}_y, etc)$. You are going to approximate the inverse of that function -- finding $\theta_{\text{aileron}}$ given $\tau_{desired}$. – Ian Sep 29 '14 at 14:38

I'm not an expert concerning aerodynamics, but I guess you are using kind of aileron to get the right roll.
So your setpoint is the roll (in degrees or something similar) and your input is the motor position (in degrees, too).