无人机AI
直播中

ygpotsyyz

6年用户 322经验值
擅长:可编程逻辑
私信 关注
[讨论]

控制系统传递函数的复数求解

!****************************************
!****************************************
! 控制系统传递函数的复数求解
!****************************************
! SINOMACH
!
! FORTRAN95,2013&18 version
!
! 控制系统传递函数的复数求解
!
! 周勇 20221125
!***************************************
!c $$ Run, Output:
!***************************************
!***************************************
Real omega, k

Complex t, c1, c2, c3, c4, c5, c6, c7

Parameter (k=0.5, t1=0.6, t2=0.5, t3=3.5, t4=6.3, t5=5.7, t6=0.15)

Read *, omega

c1 = cmplx(0.0, t1*omega)

c2 = cmplx(1.0, t2*omega)

c3 = cmplx(1.0, t3*omega)

c4 = cmplx(1.0, t4*omega)

c5 = cmplx(1.0, t5*omega)

c6 = cmplx(1.0, t6*omega)

c7 = cmplx(0.0, omega)

t = kc1c2/(c3c4c5c6c7)

abst = abs(t)

phase = 57.29578*atan2(aimag(t), real(t))

Print *, 'OMEGA=', omega

Print *, 'T=', t

Print *, 'ABS T=', abst

Print *, 'PHASE=', phase

End Program
!****************************
!Input:
!****************************
输入欧米伽值,运算结果:
0.05 (弧度每秒)

OMEGA=5.0000001E-02

T=<0.2004929,-0.1825358>

ABS T= 0.2711397

PHASE= -42.31584 (相位)

0.01
OMEGA= 9.9999998E-03

T=<0.2953270,-4.5039475E-02>

ABS T= 0.2987417

PHASE= -8.671201

0.005
OMEGA= 4.9999999E-03

T=<0.2988256,-2.2673452E-02>

ABS T= 0.2996845

PHASE= -4.339015

0.09
OMEGA= 9.0000004E-02

T=<6.7055769E-02,-0.2112889>

ABS T= 0.2216742

PHASE= -72.39236

0.15
OMEGA= 0.1500000

T=<-4.6945851E-02,-0.1394167>

ABS T= 0.1471086

PHASE= -108.6099

0.985
OMEGA= 0.9850000

T=<-2.0599025E-03,1.5385026E-03>

ABS T= 2.5710287E-03

PHASE= 143.2446

5.985
OMEGA= 5.985000

T=<-1.5164633E-05,2.1230671E-05>

ABS T= 2.6090371E-05

PHASE= 125.5374

90.123
OMEGA= 90.123000

T=<-6.3422972E-10,1.0823895E-08>

ABS T= 1.0842460E-08

PHASE= 93.35343

361.456
OMEGA= 361.4560

T=<-2.4633368E-12,1.6843657E-10>

ABS T= 1.6845458E-10

PHASE= 90.83788


广州

更多回帖

发帖
×
20
完善资料,
赚取积分