towards using gather and ppc in shapepath

This commit is contained in:
2018-10-12 16:08:24 +02:00
parent cb9310ee5c
commit baef7cdb9e
4 changed files with 209 additions and 121 deletions

View File

@@ -29,6 +29,7 @@ close all;
[pb]=simFxFyStage(mot1,1);
[ssc]=StateSpaceControlDesign(mot1,1);
[mot1,mot2]=identifyFxFyStage();
[pb]=simFxFyStage(mot2,2);
[ssc]=StateSpaceControlDesign(mot2,2);

View File

@@ -1,19 +1,38 @@
raw=desPos_actPos.Data
raw(:,2)=raw(:,1)*100
ft=fft(raw);
plot(log(abs(ft)));
plot(log(abs(ft(:,1)./ft(:,2))));
https://de.wikipedia.org/wiki/Chirp
i=int(minFrq*tSec); j=int(maxFrq*tSec); #print(w[i],w[j])
# amp, minFrq, maxFrq, tSec = (10, 10, 300, 30)
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
x=np.arange(1,300000)
y=10*np.sin(31.415926535897931*( pow(1.058324104020218,(x*0.000199996614513)) -1) /np.log(1.058324104020218))
plt.show()
plt.plot(x,y)
plt.show()
y=amp*sin( a* (b**(x*c))-1) / log(d) )
=amp*sin( a/log(d)* (b**(x*c))-1) )
x=2+3j
rho=abs(x)
theta=angle(x)
%-------------------
x=rho*exp(j*theta)
0.000199996614513=samplingrate in sec. (gatherPeriod==1?)
31.415926535897931 = pi*10 =? 2*pi*f0
1.058324104020218 = k
x*0.000199996614513 =t
1.058324104020218**60 = 30
sin( 2*pi*f0/ln(k)*(k**t-1) )
f(t)=f0*k**t = f0*e**(t*ln(k))
k**t=30 (from 10 to 300 -> 300/10=30)
log(k**t)=log(30)
log(k)*t=log(30)
log(k)=log(30)*(1/t)
log(k)=log(30**(1/t))
k=30**(1/t)
30**(1/60.) = 1.0583241040202176
-----------------------------------------------------------------
figure();
@@ -21,10 +40,6 @@ x=rho*exp(j*theta)
setoptions(h,'FreqUnits','Hz','Grid','on');legend('location','sw');
%figure();bode(ssc.ss_o(3));
%figure();tf=tf(ssc.ss_o) pzplot(tf(3));