传递函数的C语言实现
更新时间:2023-11-01 03:51:01 阅读量: 综合文库 文档下载
>> s=tf('s')
Transfer function: s
>> sys=1/(3*s+1)
Transfer function: 1 ------- 3 s + 1
>> bode(sys)
>> c2d(sys,0.0002,'tustin')
Transfer function:
3.333e-005 z + 3.333e-005 ------------------------- z - 0.9999
Sampling time (seconds): 0.0002
Y/X =
3.333e-005+3.333e-005Z(-1) -------------------------
1 - 0.9999Z(-1)
Y(1 - 0.9999Z(-1))=X(3.333e-005+3.333e-005Z(-1))
Y = X*3.333e-005X +3.333e-005X(-1)+ 0.9999Y(-1)
按照这个方程编写不对,因为系数精度太差了
>> [a b]=tfdata(ans,'v') a =
1.0e-004 *
0.333322222592580 0.333322222592580 b =
1.000000000000000 -0.999933335555481
这才是差不多的系数
>> step(sys) >> hold on >> step(ans)
Step Response1sys0.90.80.70.6Amplitude ans0.50.40.30.20.10 024681012141618Time (seconds)
>> plot(y) >> hold on
>> plot(test(1:50001))
10.90.80.70.60.50.40.30.20.10 012345x 1064 data1data2
// CTransFunc.cpp : Defines the entry point for the console application. //
#include \#include \#include \
double CTransFunc(double dInput) { static double Input[2] ={0.0,0.0}; static double Output[2]={0.0,0.0}; Input[0]=dInput; Output[0]=Input[0]*(0.0000333322222592580)+(0.0000333322222592580)*Input[1]+0.999933335555481*Output[1]; Output[1]=Output[0]; Input[1]=Input[0]; return Output[0]; }
int main(int argc, char* argv[]) { int i=0; FILE *pFile=NULL; pFile=fopen(\ for (i=0;i<200000;i++) { fprintf(pFile,\ } fclose(pFile); return 0;
}
正在阅读:
传递函数的C语言实现11-01
无粘结后张法预应力砼施工工艺06-07
互联网个人用户注册变更申请表doc版本05-23
广西良庆经济开发区园区循环化改造实施方案01-19
VASP的个人经验手册05-28
2018宜宾高三一诊理综试题及答案01-31
浅谈生本教育与课程再造在小学四年级数学课堂中的实施05-14
招投标实训心得体会01-07
社会团体登记管理条例09-15
品牌独家授权协议律师拟定版本12-06
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 函数
- 传递
- 语言
- 实现
- 20xx中秋节主题活动策划方案10篇
- 木瓜蛋白酶在食品工业中应用的研究进展
- 邮储中级多选
- 医疗废物处理技术的综述
- 政府与非营利组织
- 《燃烧与爆炸学》试题及答案
- 人教版四年级数学下册乘除法简便计算(302)
- 管理学知识点
- 十种亚热带植物群落的垂直结构模式 - 图文
- 论舞蹈编导创新性思维分析
- 变压器漏感测量方法
- 可口可乐公司发展战略分析
- 2019年高考语文冲刺大二轮专题复习专题四实用类文本阅读新闻(非连续性文本)B(含解析)
- 化工原理历年试题
- 魅族营销策划书 - 图文
- 过程控制参数检测与变送 - 图文
- 2015—2016学年金华十校第一学期调研考试试卷及答案
- 07年2+2高等数学A答案
- 关于加强企业管理基础工作的思考
- (2018版)思修教案