From: Roberto B. <rob...@su...> - 2011-04-15 12:04:33
|
Hi Richard I've finally found some time to look the new modifications for your control toolbox. With few modifications I've reached to put the sampling time in the new matlab.py, statesp.py and xferfcn.py files. My examples run correctly again, but I have some problems with the step and step2 functions. Here is the code: #------------------------------------------------------- from matplotlib.pylab import * from control.matlab import * from scipy.signal import step, step2 # Motor parameters Kt = 126e-6 Jm = 1.3024e-3 Dm = 857.4e-6 # Transfer function g=tf([Kt/Jm],[1,Dm/Jm,0]) # Continous state space form a=[[0,1],[0,-Dm/Jm]] b=[[0],[1]] c=[[Kt/Jm,0]]; d=[0]; sysc=ss(a,b,c,d) t1,y1 = step(g) t2,y2 = step(sysc) t1,y1 = step2(g) t2,y2 = step2(sysc) #--------------------------------------------------------- I have some problems with the step and step2 functions (linalg problems or 695 sys = system 696 else: --> 697 sys = lti(*system) 698 if N is None: 699 N = 100 TypeError: type object argument after * must be a sequence, not instance Any Idea? Thanks in advance Roberto -- ----------------------------------------------------------------------------- Great spirits have always encountered violent opposition from mediocre minds (A. Einstein) ---------------------------------------------------------------------------- University of Applied Sciences of Southern Switzerland Dept. Innovative Technologies CH-6928 Lugano-Manno http://web.dti.supsi.ch/~bucher |