Tuning parameters using signal constraint blockset wtih an AC signal as the reference

3 ビュー (過去 30 日間)
I feed it a 60hz reference variable from teh workspace and it just pops out the parameter values that I already have. Plus the signal that is generated doesn't look anything like the reference that I am asking it to tune it's response to.
The question is can I use an AC signal for the reference? If so how do I use it? Thank you, Daniel

採用された回答

Alec Stothert
Alec Stothert 2011 年 7 月 7 日
Hi Daniel,
I don't know your exact problem but generally trying to match frequency characteristics from time domain signals is tricky.
For example consider a simple frequency estimation problem, where we try to use a sum-squared-error value to optimize a sinusoid frequency to match a reference:
w0 = 2*pi*60; %Reference frequency
w = linspace(0.5*w0,2*w0,1e3); %Frequency to tune/identify
T = 0.2; %Time horizon
%Compute analytic SSE(w) = \int_0^T | sin(w_0 t) - sin(w t) |^2 dt
SSE = T - 0.5 * sin(2*w0*T)/(2*w0) - 0.5*sin(2*w*T)./(2*w)...
- sin( (w-w0)*T )./(w-w0) + sin( (w+w0)*T )./(w+w0);
%Plot SSE
plot(w,SSE)
title('SSE(w)=\int_0^T | sin(w_0 t) - sin(w t) |^2 dt')
xlabel('w')
Notice that the SSE has multiple local minima. I believe this is similar to what you are observing, that is the optimizer is getting stuck in a local minima. For the simple problem above I tried using a Signal constraint block with simplex algorithm instead of gradient descent and achieved reasonable results.
If possible an alternative is to formulate the problem directly in terms of frequency. Could you calculate the frequency of the signal that you want to tune and pass that to the Signal Constraint block and have it track the reference 60hz constant value?
Hope that helps
-Alec
  1 件のコメント
Daniel Pope
Daniel Pope 2011 年 7 月 7 日
Hi Alec,
Thank you for your help. I'm using it to tune parameters for an inverter with a digital current loop and outer digital voltage loop. Unfortunately it would be difficult for me to change the signal to DC using DQ reference frame since I"m only simulating one phase.
I'm just using the step response now to do the tuning and am getting good results with that. I made the step requirements really tight and loosened them up until it passed. It gave me parameters that had taken me a couple of days to get before. I really like the 'Uncertain parameters' since I can use them to check the response under different loads.
I'm thinking about increasing the order of the controller of the voltage loop. How many parameters can i take the auto tuning up too? Also can I decrease the length of time (seems to be 1 sec currently) it runs the simulation between tries?
Daniel

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNonlinear Control についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by