dspace1103控制器特点_
dSPACE使用手册
2
dSPACE—实时快速原型及硬件在回路仿真的一体化解决途径 .................... 7
2.1 RCP(Rapid Control Prototyping)—快速控制原型...................................................... 7 2.2 HILS(Hardware-in-the-Loop Simulation)—硬件在回路仿真 .................................... 8 2.3 用 dSPACE 进行控制系统开发........................................................................................ 9 2.4 建立用户 dSPACE 系统.................................................................................................. 12
dspace配置的优缺点比较
dSPACE*** 基于Matlab/Simulink平台***实时快速原型及硬件在回路仿真的一体化解决途径1概述在当今社会,市场对产品的需求呈现多样性、快速性的趋势,这就使企业的新品开发面临着多样性需求与快速开发之间的矛盾;同时对控制系统鲁棒性及可靠性的要求也日益增加;另外并行工程(即:设计、实现、测试和生产准备同时进行)被提上了日程。
DSPACE 的产品为并行工程的实现创造了一个良好的环境。
对于进行控制算法研究的工程师而言,最头疼的莫过于没有一个方便而又快捷的途径,可以将他们用控制系统设计软件 (如MATLAB/Simulink) 开发的控制算法在一个实时的硬件平台上实现,以便观察与实际的控制对象相连时,控制算法的性能;而且,如果控制算法不理想,还能够很快地进行反复设计、反复试验直到找到理想的控制方案。
对一些大型的科研应用项目,如果完全遵循过去的开发过程,由于开发过程中存在着需求更改,软件代码甚至代码运行硬件环境不可靠(如:新设计制造的控制单元存在缺陷)等问题,最终导致项目周期长、费用高,缺乏必要的可靠性,甚至还可能导致项目以失败告终。
这就要求在开发的初期阶段就引入各种试验手段,并有可靠性高的实时软/硬件环境做支持。
另外,当产品型控制器生产出来后,测试工程师又将面临一个严重的问题。
由于并行工程的需求,控制对象可能还处于研制阶段,或者控制对象很难得到,用什么方法才能在早期独立地完成对控制器的测试呢?我们将这些问题概括为两种:快速控制原型(RCP)和硬件在回路仿真(HILS)。
d SPACE 提供了这两方面应用的统一平台。
2Dspace介绍dSPACE实时仿真系统是由dSPACE公司开发的一套基于MA TLAB/Simulink的控制系统开发及测试的工作平台,实现了和MATLAB/Simulink的完全无缝连接。
dSPACE实时系统拥有具有高速计算能力的硬件系统,包括处理器、I/O等,还拥有方便易用的实现代码生成/下载和试验/调试的软件环境。
DSPACE简单使用入门
DSPACE1103简单使用说明在软件都安装正确的基础上,在此对DSPACE中的软件Controldesk的使用做一个简单的介绍(PS:DS1103为DSPACE硬件)。
1准备工作首先将57381接到电脑的USB插口,(类似绿色的U盘,验证用,每次使用都需要连接电脑),同时将蓝色的传输线接到转接口上,之后再接到电脑的Expresscard接口上,然后我们打开MA TLAB R2013a(DPACE只支持2012b及以上的版本),选择Simulink Library打开Simulink。
2 Simulink参数设置在Simulink中File-New-Model,新建模型,并对模型进行参数设置2.1 Solver界面设定:(1) Start Time: 一般设定为0(2) Stop Time:如需程序一直运行,设定为inf;如果需程序运行特定的时间,如100s,则设定为100(3) Solver Type:一定为Fixed-step(4) Solver:无需特殊设定,一般ODE1最简单,会影响积分算法(5) Fixed Step Size:设定为固定值,不需要太小,代表程序运行步长,典型值为0.001或0.00012.2 优化界面设定(1) Block reduction:勾选去掉(2) Conditional input branch execution:勾选去掉2.3 信号参数界面设定(1) Inline parameters:勾选去掉(2) Signal Storage reuse:勾选去掉2.4 代码生成界面设定System Target file:选择相应硬件板卡的tlc文件,如硬件为DS1103,就选择RTI1103.TLC2.5 仿真选项界面设定(一般可以选择默认)(1) initial simulation state:程序下载后初始状态设定,可在RUN,PAUSE,STOP中选择(2) task configuration:任务配置设定,处理simulink模型中不同任务的优先级,overrun设定等细节2.6 下载选项设定load application after build:模型编译后自动下载。
半实物仿真简介
半实物仿真平台简介2.1组成半实物仿真平台主要由主控计算机、仿真计算机、控制计算机(原型机)、A/D接口、D/A接口及相关能源设备、记录设备等组成,如图1所示。
其中被控对象采用数学仿真,由dSPACE仿真计算机通过软件实现;控制计算机用仿真实物实现,即用dSPACE标准组件作为控制计算机的快速原型机,实现控制计算机功能;仿真计算机通过A/ D、D/A等输入输出口与控制系统实物相互,实现数字控制器与外界设备的信息交换。
输入和输出信息分别从转接口和dSPACE引出,通过记录仪进行记录。
2.2主控计算机主控计算机是整个仿真系统的上位机,采用有多个ISA总线的工控机,安装MATLAB6.5系列软件、dSPACE软件,用于构建控制系统Simulink框图、进行系统参数优化和数字仿真、控制仿真过程、编译下载仿真软件、输入输出仿真结果等。
根据控制系统设计和建模结果,利用MATLAB/Simulink构建系统数字仿真框图,进行数字仿真和控制参数优化。
在数字仿真的基础上,利用dSPACE提供的RTI软件,将被控对象的Simulink框图生成实时代码并自动下载到dSPACE仿真计算机中;将控制器控制方程的Simulink框图生成实时代码并自动下载到dSPACE快速原型机中。
用dSPACE提供的综合试验与测试环境软件ControlDesk、自动实验及参数调整软件MLIB/MTRACE、PC与实时处理器通信软件CLIB 以及实时动画软件RealMotion等实现试制和参数测量。
该软件环境可以方便地实成、下载和试验调试等工作。
2.3仿真计算机用dSPACE标准组件系统DS1005PPC处理器板作为仿真计算机,用以模拟被控对象。
DS1005PPC处理器与主控机之间用光缆连接交换数据。
DS1005PPC板主频480MHz;片内数缓存均为32KwordS;通过32位PHS总16块I/O板,通过ISA总线与主机进行并具有相当强的计算能力。
(完整版)DSPACE应用简介
dSPACE 实时仿真平台软件环境及应用一、dSPACE 简介dSPACE实时仿真系统是由德国dSPACE公司开发的一套基于MATLAB/Simulink 的控制系统在实时环境下的开发及测试工作平台,实现了和MATLAB/Simulink 的无缝连接。
dSPACE 实时系统由两大部分组成,一是硬件系统,二是软件环境。
其中硬件系统的主要特点是具有高速计算能力,包括处理器和I/O 接口等;软件环境可以方便地实现代码生成/下载和试验调试等工作。
dSPACE 具有强大的功能,可以很好地完成控制算法的设计、测试和实现,并为这一套并行工程提供了一个良好的环境。
dSPACE 的开发思路是将系统或产品开发诸功能与过程的集成和一体化,即从一个产品的概念设计到数学分析和仿真,从实时仿真实验到实验结果的监控和调节都可以集成到一套平台中来完成。
dSPACE 的软件环境主要由两大部分组成,一部分是实时代码的生成和下载软件RTI(Real-Time Interface),它是连接dSPACE 统与MATLAB/Simulink 纽带,通过对RTW(Real-Time Workshop)进行扩展,可以实现从Simulink 模型到dSPACE 实时硬件代码的自动下载。
另一部分为测试软件,其中包含了综合实验与测试环境(软件)ControlDesk、自动试验及参数调整软件MLIB/MTRACE、PC 与实时处理器通信软件CLIB 以及实时动画软件RealMotion 等。
二、dSPACE的优点dSPACE 实时仿真系统具有许多其它仿真系统具有的无法比拟的优点:1、dSPACE 组合性很强。
2、dSPACE 的过渡性和快速性好。
由于dSPACE 和MATLAB 的无缝连接,使MATLAB 用户可以轻松掌握dSPACE 的使用,方便地从非实时分析、设计过渡到实时的分析和设计上来,大大节省了时间和费用。
3、性能价格比高。
dSPACE 是一个操作平台,它可用于许多产品的开发或实时仿真测试,而不是一物一用。
永磁同步电机转速环的一种变结构PI控制器
永磁同步电机转速环的一种变结构PI控制器符慧;左月飞;刘闯;张捷【摘要】在永磁同步电机调速系统中,传统PI控制的阶跃响应存在超调的问题.采用IP控制虽可消除超调,但会使系统响应变慢,对时变输入的跟踪性能变差.为此,本文提出了一种变结构PI (Variable Structure PI,VSPI)控制器,在传统PI控制器的基础上引入输入微分前馈,并将误差比例环节与误差积分环节并联的结构改为误差的比例微分环节与积分环节串联的结构.结合遇限停止积分的抗积分饱和环节,VSPI控制在时变输入时等效于PI控制,在阶跃给定时等效于IP控制,因此,VSPI控制在解决阶跃响应的超调问题的同时提高对时变输入的跟踪精度.实验结果验证了所提控制方法的有效性和实用性.【期刊名称】《电工技术学报》【年(卷),期】2015(030)012【总页数】6页(P237-242)【关键词】永磁同步电机;PI;IP;超调;输入微分前馈【作者】符慧;左月飞;刘闯;张捷【作者单位】南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016【正文语种】中文【中图分类】TM351永磁同步电动机(Permanent Magnetic Synchronous Motor,PMSM)以其高功率/重量比、高转矩/惯量比、高效率和具有一定鲁棒性等优点,被广泛应用于工业调速系统中。
传统的PMSM调速系统大多采用双环线性控制结构,内环为电流环,外环为速度环。
尽管多种先进的复杂控制策略如非线性PI控制[1]、自适应控制[2-3]、模糊控制[4]、滑模变结构控制[5-6]等被应用于PMSM调速系统中,但这些非线性控制策略对处理器要求高或存在抖振等问题,还有待进一步改进。
因此,在工业应用中占主导地位的控制方法仍是传统的线性PI控制。
然而传统线性PI控制存在一些问题,比如控制参数整定困难、阶跃响应存在超调等。
车用电机硬件在环实时仿真与测试平台
车用电机硬件在环实时仿真与测试平台高瑾;黄洋;宋石阳;姜淑影;黄苏融【摘要】车用内置式永磁电机功率密度高,参数非线性变化显著.针对此情况,本文在高速FPGA芯片上建立车用永磁电机的非线性模型,与真实控制器连接,构建了硬件在环半实物实时仿真与测试平台(HIL-bench).利用两台产品级车用永磁电机组成共直流母线互馈对拖平台(M/G-bench),与所构建的实时仿真测试平台进行对比.测试转速范围从恒转矩区到弱磁区,测试转矩从轻载到额定负载.对比结果表明,在高速指标方面,HIL-bench系统仿真步长已达到1μs;在逼近现实工况指标方面,两个平台的平均误差为4.15%.【期刊名称】《电工技术学报》【年(卷),期】2014(029)011【总页数】8页(P99-106)【关键词】车用永磁电机;硬件在环;非线性;对拖【作者】高瑾;黄洋;宋石阳;姜淑影;黄苏融【作者单位】上海大学机电工程与自动化学院上海 200072;上海大学机电工程与自动化学院上海 200072;上海大学机电工程与自动化学院上海 200072;上海大学机电工程与自动化学院上海 200072;上海大学机电工程与自动化学院上海200072【正文语种】中文【中图分类】TM3151 引言内置式永磁同步电机(IPMSM)在当前电动汽车驱动中的应用是比较广泛的[1,2]。
IPMSM 的参数非线性变化是影响其性能的一个重要原因,电流[3]、温度[4,5]等因素对参数的非线性都有不同程度的影响,且随着转速的增加,这种非线性的变化更加明显。
为了提高仿真的可信度,取得逼近现实的仿真结果,上述非线性问题在建模时应予以考虑,这无疑增大了建模的复杂性。
半实物实时仿真技术已广泛应用于无人机自动测试跟踪[6]、飞行器姿态控制[7]及飞船太空舱的水平和垂直自由度的控制[8]等航空领域,它是将系统的一部分用仿真模型来等效,保留了另一部分实物,两者连接后实时运行。
半实物实时仿真目前分为两大类:快速控制原型(Rapid Control Prototype,RCP)与硬件在环(Hardware-in-Loop,HIL)。
自适应线性自抗扰控制器的设计
自适应线性自抗扰控制器的设计奚静思;刘品宽;丁汉【摘要】自抗扰控制器对于抑制不确定的扰动有良好的效果,但其控制器参数较多且整定困难.为了实现自适应的线性自抗扰控制器,对线性自抗扰控制器的参数整定策略展开了研究.首先,设计了基于观测误差的线性扩张观测器参数自适应整定算法.接着,设计了自抗扰控制器线性反馈环节的参数的自适应整定算法.最后,利用李雅普诺夫方法,证明上述自适应整定算法得到的参数可以保证扩张状态观测器的观测误差和被控系统最终输出误差都收敛至零.实验结果表明:精密气浮运动平台低速工况下,自适应线性自抗扰控制器的参数在0.8s内即可迅速完成整定计算;线性扩张观测器观测误差绝对值小于2 nm;被控精密气浮运动平台的速度波动不大于5%.自适应线性自抗扰控制器实现了控制器参数在线整定,控制器的性能表现满足要求.【期刊名称】《光学精密工程》【年(卷),期】2018(026)007【总页数】9页(P1749-1757)【关键词】自抗扰控制;自适应控制;参数整定;直线电机【作者】奚静思;刘品宽;丁汉【作者单位】上海交通大学机械与动力工程学院 ,上海200240;上海交通大学机械与动力工程学院 ,上海200240;上海交通大学机械与动力工程学院 ,上海200240【正文语种】中文【中图分类】TP394.1;TH691.91 引言针对不确定系统的控制器设计是自动控制研究领域的重要组成部分。
自抗扰控制器(Active Disturbance Rejection Controller, ADRC)抗干扰性能好且控制器结构简单[1-3],近年来已被广泛研究和应用于诸多领域[4-10]。
其特点是通过扩张状态观测器实时、主动地估计和补偿总的不确定性(或总干扰),并利用反馈控制器将所有的不确定干扰在系统中整合补偿[11-12]。
然而,传统的自抗扰控制器中包含了很多非线性元件,其参数整定过程十分复杂,成为自抗扰控制算法被广泛应用的主要障碍。
dSPACE的资料——非常好用
,dSPACE*** 基于Matlab/Simulink平台***实时快速原型及硬件在回路仿真的一体化解决途径恒润科技有限公司2004年6月目录1概述 (1)2dSPACE—实时快速原型及硬件在回路仿真的一体化解决途径 (1)2.1RCP(Rapid Control Prototyping)—快速控制原型 (1)2.2HILS(Hardware-in-the-Loop Simulation)—硬件在回路仿真 (1)2.3用dSPACE进行控制系统开发 (1)2.4建立用户dSPACE系统 (1)3dSPACE体系结构 (1)3.1dSPACE软件 (1)3.1.1代码生成及下载软件(Implementation Software) (1)3.1.1.1代码的生成过程 (1)3.1.1.2MATLAB/Simulink-现代控制设计平台 (1)3.1.1.3RTI(Real-Time Interface)-从方框图自动生成代码并下载 (1)3.1.1.4PPC编译器 (1)3.1.2实验软件(Experiment Software) (1)3.1.2.1ControlDesk综合实验环境 (1)3.1.2.2MLIB和MTRACE—实现自动试验及参数调整 (1)3.1.2.3MotionDesk—实时动画 (1)3.1.2.4CLIB---PC与实时处理器通讯 (1)3.1.2.5AutoMationDesk-自动化测试工具 (1)3.1.3TargetLink-产品级代码的生成 (1)3.2dSPACE硬件 (1)3.2.1智能化的单板系统 (1)3.2.1.1DS1103 PPC 控制器板 (1)3.2.1.2DS1104 PPC 控制器板 (1)3.2.2标准组件系统 (1)3.2.2.1处理器板(Processor Boards) (1)3.2.2.1.1处理器板概述(总线和中断) (1)3.2.2.1.2DS1005 PPC板-处理器POWER PC750FX,800MHz (1)3.2.2.1.3DS1006 PPC板-处理器X86处理器,2.2GHz (1)3.2.2.2I/O板 (1)3.2.2.2.1简单A/D和D/A转换 (1)3.2.2.2.2Multi-I/O (1)北京恒润科技有限公司 13.2.2.2.3增量编码器接口 (1)3.2.2.2.4定时及数字I/O (1)3.2.2.2.5复杂模拟信号及阻型传感器 (1)3.2.2.2.6其它I/O (1)3.2.2.2.7DS2211 HIL I/O板 (1)3.2.2.3附件(Accessories) (1)3.2.2.3.1大系统扩展盒PX10/PX20 (1)3.2.2.3.2接插键指示灯面板 (1)3.2.2.3.3DS830连接缓冲器板-连接远距离系统 (1)3.2.3汽车内置系统 (1)3.2.3.1AutoBox-汽车内置试验扩展箱 (1)3.2.3.2MicroAutoBox-车辆快速测试控制原型系统的最佳选择 (1)4应用实例 (1)4.1机器人新型控制原理测试--用μ-综合与分析法控制机械手 (1)4.2驱动方面的应用-验证ASIC控制器原理 (1)4.3机械工程方面的应用—Achenbach Buschhüten 平面度控制 (1)4.4航空航天方面的应用—Simona开发飞行仿真器 (1)4.5汽车的硬件在回路仿真—ABS控制器测试试验台 (1)4.6电力电子方面的应用-机车驱动系统硬件在回路仿真 (1)4.7ECU开发应用-菲亚特公司开发ERG控制器 (1)4.8DaimlerChrysler开发主动悬架 (1)4.9Delphi利用Targetlink进行电控产品开发 (1)4.10Audi公司动力传动系统HIL仿真测试 (1)4.11DS2302、DS4002的应用实例 (1)附录1—I/O板技术特性 (1)附录2—dSPACE对计算机软件及硬件的要求 (1)北京恒润科技有限公司 21概述在当今社会,市场对产品的需求呈现多样性、快速性的趋势,这就使企业的新品开发面临着多样性需求与快速开发之间的矛盾;对控制系统鲁棒性及可靠性的要求也日益增加;并行工程(即:设计、实现、测试和生产准备同时进行)被提上了日程。
gc1103英文规格书
gc1103英文规格书GC1103是地芯科技推出的一款射频前端芯片,专为IEEE 802.15.4/Zigbee、蓝牙无线传感网络以及其他2.4 GHz ISM频段无线系统而设计。
以下是GC1103英文规格书的简介:该芯片采用CMOS工艺实现,是一款高度集成的单芯片器件。
内部集成了射频功率放大器(PA)、低噪声放大器(LNA)、带通滤波器以及芯片收发开关控制电路。
此外,GC1103的CMOS功能控制逻辑电路非常简单,功耗低,仅需少量的外围器件,非常方便于系统的整体集成设计。
GC1103的主要特性包括:1.输入输出端口匹配到50-Ohm。
2.集成+22dBm输出功率的功率放大器(PA)。
3.集成3dB噪声系数的低噪声放大器(LNA)。
4.集成带通滤波器,适用于节能发射或低接收增益的应用。
5.发射/接收开关切换电路,所有端口的ESD保护电路。
6.GC1103的常规应用主要包括工业控制自动化、智能家居和符合RF4CE协议的射频系统。
以下是关于GC1103的更多详细信息:主要优点:1.高集成度:GC1103将多个关键射频组件集成到一个芯片中,大大简化了无线系统的设计和制造过程。
2.低功耗:采用先进的CMOS工艺,GC1103在实现高性能的同时,也实现了低功耗,这对于依赖电池供电的无线设备尤为重要。
3.易于使用:简单的控制逻辑和少量的外围器件需求使得GC1103非常易于集成到各种系统中。
4.出色的性能:内部的功率放大器能够提供高达+22 dBm的输出功率,而低噪声放大器则具有极低的噪声系数,确保了高质量的信号传输。
5.坚固耐用:所有端口都配备了ESD(静电放电)保护电路,增加了芯片的可靠性和耐用性。
6.应用领域:7.GC1103因其出色的性能和易用性,被广泛应用于各种2.4 GHz ISM频段的无线系统中,包括但不限于:8.工业控制和自动化:在工厂自动化、过程控制等领域,GC1103能够提供稳定可靠的无线通信解决方案。
dsPACE控制直流电机
dSPACE DS1103 Control Workstation Tutorial and DCMotor Speed ControlTutorialByAnnemarie ThomasAdvisor: Dr. Winfred AnakwaMay 11, 2009Table of ContentsIntroduction (1)Controller (1)ControlDesk (1)CLP1103 Connector Panel (2)Motor System (2)Optical Encoder System (2)Equipment (2)Setup/Startup (4)Detecting the DS1103 (6)Creating a New Simulink Model (8)Opening MATLAB/Simulink (14)Option A: (14)Option B: (15)Building/Downloading a Model (17)Monitoring/Controlling/Recording Values (22)Normal Process (22)CaptureSettings Instrument (31)Motor Speed Control Application (38)References (58)IntroductionThe purpose of this tutorial is to introduce Bradley University’s dSPACE DS1103 Workstation to new users. Use of this tutorial will minimize the time required for students (of senior undergraduate level or higher) to become proficient in using the workstation. This should allow them to spend less time learning about the workstation, so they can spend more time designing and implementing more complex control systems.The example system used in this tutorial is a DC motor speed control system. The controller has been designed and simulated using both the Simulink and the dSPACE blocksets, the MATLAB-to-DSP interface libraries, Real-Time Interface to Simulink, and Real-Time Workshop, all located on the workstation PC. The controller will be downloaded onto the Texas Instruments’ TM320F240 DSP [1] located on the DS1103 board.A general block diagram for the system is shown in figure 1 below.ControllerThe controller was designed using hand and MATLAB calculations and Simulink Simulation. It was then added to the Simulink Model that was downloaded to the DS1103 DSP. For more information see the final project report for this project [2].ControlDeskControlDesk serves multiple purposes. It provides the interface for downloading controller models onto the DSP and provides the ability to interface with the entire system so inputs, such as the desired motor speed, can be altered and output data can be monitored on the PC display in real-time.CLP1103 Connector PanelThe CLP1103 Connector Panel serves as an interface between the DS1103 and all external hardware. The CLP1103 Connector Panel contains connectors for twenty (20) Analog-to-Digital inputs, eight (8) Digital-to-Analog outputs, and several other connectors that can be used for Digital I/O, Slave/DSP I/O, Incremental Encoder Interfacing, CAN interfacing, and Serial Interfacing. [3]. Only the Slave I/O (for PWM output) and Incremental Encoder interfaces are used in this tutorial.Motor SystemThe Motor System includes a motor and additional analog components, most of which are listed in the “Equipment” section that follows.Optical Encoder SystemThe Optical Encoder System is an optical encoder connected to the motor with necessary pull-up resistors and power/ground connections added.EquipmentRequired Equipment for this tutorial is:∙The dSPACE DS1103 Workstation. (See figure 2 on the next page.)∙Pittman GM9236C534-R2 DC Motor.∙HEDS 9100 Two Channel Optical Incremental Encoder Module and 512 CPR code wheel (attached to the internal motor shaft).∙Magtrol HB-420 Brake.∙TIP120 Transistor.∙IN4004 Diode.∙SN7407 Hex Inverters.∙Connectors with wires for the pins used as inputs and outputs to the CLP1103 Connector Panel. (See more details in the “Motor Speed Control Application”section.)∙Other required/desired electronic components (resistors and wires), power supplies, and measurement devices.All of this equipment was readily available at Bradley University at the time this tutorial was written.Note1: The next several sections are general processes that should be followed. Skip to the section titled “Motor Speed Control Application” to follow these steps in an actual application. Even if the example application is not being used, reading through the instructions in that section may provide some additional hints and tips that might make using the system easier.Figure 2: WorkstationNote2: If additional information is required, please refer to the final project report for this project[2] or contact Dr. Anakwa at Bradley University.Setup/Startup1.Turn on the DS1103 Board using the power switch on the back of the expansion box.Figure 3: Back View of Expansion Box with switch highlighted.2.Open ControlDesk from the Start Menu.To open ControlDesk go to: Start ► EE Applications ► dSPACE Tools ► ControlDeskFigure 4: Location of ControlDesk Icon in the Start Menu3.Scroll to the bottom of the ControlDesk Disclaimer dialog box when it appears and select“Accept”.Figure 5: ControlDesk Disclaimer dialog box.Note: This disclaimer does not affect this workstation since the PC is currently running the Windows XP operating system, not Windows Vista.4.ControlDesk should now be open.Figure 6: ControlDesk WindowNote: ControlDesk will complain if the DS1103 board is not turned on first.Detecting the DS1103Note: These steps should not need to be followed every time the system is used. These steps are generally needed the first time the workstation is setup and any time after when an error occurs in MATLAB when code is being built announces that the board has not been detected or the “ds1103” and “Slave DSP” do not appear in the “Platform” tab in ControlDesk.Figure 7: View of Platform tab in ControlDesk before and after DS1103 has been detected.1.Select “Register” from the menu in ControlDesk.To select “Register”, in the main menu go to: Platform ► Initialization ► RegisterFigure 8: Location of Register selection in ControlDesk main menu.2.From t he “Register Board” dialog box that appears, select “DS1103 PPC Controller Board”from the “Type” dropdown menu and set the “Port address” to 300. Then select the“Register” button.Figure 9: Correct selections in Register Board dialog box.3.The DS1103 Board and DSP should now be reported as detected in the ControlDesk“Platform” tab.Figure 10: DS1103 and Slave DSP shown in the Platform tab with the system stopped.Creating a New Simulink ModelFor best results, a new Simulink Model should be opened from ControlDesk itself. If other processes are used to create a new Simulink Model, there is a chance that there will be issues when the steps in the “Building/Downloading Model” section later in this document are followed. Once the model is created, the instructions in the “Opening MATLAB/Simulink” section can be used to re-open, edit, and build the model in the future.1.Create a folder on the Desktop or another location on the computer for your project.2.Open ControlDesk and Select the “Platform” tab of the left menu window.Note: Do not close ControlDesk until all the steps in this section of the tutorial are completed.Figure 11: Location of Platform tab in ControlDesk.3.In the “Platform” window, Right-click “Simulink” and Select “New Model…” from themenu that appears.4.Select the folder that was created for the project from the “Look in:” drop down menu at thetop of the “New Model” window. Type in a name for the new Simulink Model file in the “File Name:” box, and then, Select the “Open” button.Figure 13: Naming the new Simulink Model File.5.Locate the Simulink Model that opened with the name entered in the previous step and Buildit.To Build the Model from the model’s main menu go to:Tools ► Real-Time Workshop ► Build ModelFigure 14: Selecting Build Model.Note: To see the Build process running, view the MATLAB “Command Window”.6.Delete the Simulink blocks from the model but do not delete the grey “RTI Data” icon.Figure 15: New Simulink model showing RTI Data icon and DS1103 PWM block added.7.Start adding Simulink blocks to the model for the project. Save the model before closing it.Opening MATLAB/SimulinkThere are Several Ways to open MATLAB and Simulink when a Simulink model has already been created. Two possible options are listed below.Option A:Open the existing “.mdl” file for the project from it s folder on the drive.Note: This only works if you have an existing model.1.Find the .mdl file on the drive and double-click the file to open it. (This will causeboth MATLAB and Simulink to open.)Figure 16: test.mdl file selected to be opened.2.Select the “RTI1103” button in the “Select dSPACE RTI Platform Support” dialogbox that appears in MATLAB.Figure 17: Select dSPACE RTI Platform Support dialog box.Option B:Open MATLAB from ControlDesk. This process does require more steps.1.From ControlDesk, right-click “Simulink” in the “Platform” tab, and select “OpenMATLAB”. (This will open just a MATLAB Command Window.)Figure 18: Link to Open MATLAB from ControlDesk.2.To open the Simulink Library Browser, enter “simulink” into the MATLA BCommand Window.Figure 19: Enter "simulink" into the MATLAB Command Window.3.Next, Open the existing “.mdl” file using the “Simulink Library Browser” mainmenu.To Open an existing file go to: File ► Open.Then find and select your file on the drive and select the “Open” button in the “Open”dialog box.Figure 20: Opening an existing file from the Simulink Library Browser.Building/Downloading a Model1.Open the “Configuration Parameters” window from the main menu of your open modelwindow.To open the “Configuration Parameters” window go to:Simulation ► Configuration Parameters…2.Set the required/desired parameters in the “Configuration Parameters” window. Make sureto set the sampling time (“Fixed-step size”) to the correct value for the project.To change the sampling time go to: Solver ► Fixed-step size.Then, Set to desired sampling time.Figure 22: Configuration Parameters window with sampling time set to 0.001s or 1ms.3.Set the “Real-Time Workshop” settings and select the “Build” button to build and downloadcode from the Simulink model. (Code building progress is output to the MATLABCommand Window.)Real-Time Workshop Settings:a.System target file: rti1103.tlcnguage: Cc.Make command: make_rtid.Template makefile: rti1103.tmfe.Select checkbox for “Generate makefile”Note1: ControlDesk needs to be open for this step to complete all processes well. There will be no error message if ControlDesk is not open, but certain tabs in ControlDesk used for monitoring and controlling variables will not be automatically opened.Figure 23: Real-Time Workshop Settings.Figure 24: End of output in MATLAB Command Window for a successful build.Note2: To make sure the files generated are placed in the folder desired, it is advisable to select the “File Selector” tab at the bottom of the ControlDesk window, select and right-click the folder where the files should be placed, and select “Change to Working Directory” before building any code each time.Figure 25: Setting the Working Directory/Build folder.4.The code should be built and downloaded and running on the DS1103 and Slave DSP now.Monitoring/Controlling/Recording ValuesLayouts are one of the more interesting functions in ControlDesk. They allow the value of constant/input blocks, gain blocks, and perhaps some other blocks to from the Simulink model downloaded to the DS1103 to be changed while the system is running. They also allow real-time reporting of output values and saving/recording of values over a time period for analysis/viewing in MATLAB later.Normal Process1.Create a new layout or Open an existing layout using the ControlDesk main menu.A. To Open an existing file go to: File ► Open. Then find and select your file on thedrive and select the “Open” button in the “Open” dialog box.B. To Create a new file go to: File ► New ► Layout.Note: Make sure to save and rename your file before closing it later.Figure 26: Create a new layout.2.Expand the layout window that appears in the ControlDesk workspace to fit most of theworkspace by dragging the double-headed arrows that appear when the mouse passes over the edges of the window.Figure 27: Expanded layout window in ControlDesk.3.Set ControlDesk to “Edit Mode” by either selecting it from the toolbar or by selecting it fromthe “Instrumentation” dropdown menu of the main menu.(The “Virtual Instruments” s ide panel should appear.)Figure 28: Selecting Edit Mode in ControlDesk.4.Now “Virtual Instruments” and “Data Acquisition” Tools can be added to the layout. This isdone by single-clicking instruments in the side panel (without holding the mouse button down), then clicking and then holding the mouse button down in the layout window while dragging the corner of the box that begins to appear for that particular instrument.Figure 29: Adding a Virtual Instrument.Figure 30: Adding Plotter Array from the Data Acquisition Menu.5.Verify a tab for the “.sdf” file generated for the project is available near the bottom of theControlDesk window. If it is not, rebuild the project using the instructions in the“Building/Downloading a Model” section of this tutorial, beginning on page 13.Figure 31: Location of .sdf tab in the ControlDesk window.6.To connect/assign variables from the Simulink model downloaded to the DS1103, locate thevariable in the “.sdf” menu(s) and then click-and-drag it to its instrument in the layout.(Generally, the values of constants and gain blocks in the model can be monitored andmodified/controlled in real-time and outputs/connections between blocks can be monitored only.)Note: To connect to the outputs of dSPACE blocks in the downloaded Simulink model, a gain (of 1) block needs to be connected to the output of the block if nothing else is connected to it other than a terminator block.Figure 32: Connecting Variables to Instruments.Figure 33: Completed layout with location of additional connections not shown in Figure 28 highlighted.7.Change the properties of the instruments as desired.Accessing the “Properties” menu(s) for a particular instrument done by either:A. Left-clicking the instrument to select it and then selecting “Properties” from theControlDesk main menu “View” menu.B. Right-clicking the instrument and s electing “Properties”.Figure 34: Two methods of opening the Properties dialog for an instrument.Find the property that should change under one of the tabs and change it. (Generally, only Max and Min “Range” values need to be changed and/or Range “Check Mode” needs to be Enabled, but other properties such as the color of the instrument and text can be changed as well.)Figure 35: Changing the Range of the DutyCycle Slider input.8.Verify the instruments now functions as desired without affecting the system (or the otherinstruments) using “Test Mode”, which is found in a similar manner to “Edit Mode” in Step3 of this section. (This is useful to verify that the “Range” enabled for “Check Mode” for a ninstrument such as the “NumericInput” instrument - not used in this section - rejects values input that are outside that range.)Figure 36: Location of Test Mode button on main toolbar.9.To use the instruments to control and monitor that actual, running, real-time system, select“Animation Mode” in a similar manner to selecting “Edit Mode” in Step 3 of this section. (It appears “Properties” can also be modified in this mode.)Figure 37: System running with Animation Mode active.10.Additional instruments such as the “CaptureSettings” instrument, used for saving/recordingdata, can be added later by repeating Steps 3-9 of this section for the new instrument. It should also be possible to create and use multiple layouts at the same time.Note: For instructions/details about the “CaptureSettings” instrument, see the “CaptureSettings Instrument” subsection that follows.CaptureSettings InstrumentThe “CaptureSettings” instrument found in the “Data Acquisition” instrument menu allows data output on “PlotterArray” instruments (and only “PlotterArray” instruments) to be saved/recorded for later analysis/use in MATLAB or perhaps some other program.Figure 38: CaptureSettings instrument (red boxes) added to a layout with associated PlotterArrays (blue boxes). A NumericInput instrument is also included in this layout below the slider.The “CaptureSettings” instrument is added in the same way as any other instrument (See Steps3-9 in the “Normal Process” subsection previous to this one.), but the space provided for it must be large enough to access all its functions and most of the “Properties” can also be accessed Figure 39: Most tabs in the Properties and Settings dialog boxes for the CaptureSettings instrument areexactly the same.Note: For this tutorial only the “Stream to Disk” “Acqu i sition” method was used in its simplest form. To see more functions of this instrument, search for “How to Generate and Save Reference Data” or “Working with Data Captures” in the ControlDesk “Help” menu found on the ControlDesk main menu bar.After the CaptureSettings instrument has been added and PlotterArrays have been added for the variables that should be recorded:1.Set the top dropdown menu for the instrument is to “PPC - HostService”. (The name for theproject will be included as well.)2.Open the Settings or Properties dialog for the CaptureSettings Instrument and select the“Acquisition” tab. Select the bullet box for “Stream to Disk”.3.Select the button with “…” at the end of the line for “Stream to Disk” and create or select afile for the data to be saved to. The file will be saved as an “.idf” file.Figure 40: Set Stream to Disk mode and create/select location for captured data.4.Select “OK” at the bottom of the dialog box to exit the menu.5.If the “Start” button on the instrument is selected now, ControlDesk may report an error withthe “Length” or “Downsampling” S ettings. Arbitrarily setting the “Length” to “2” will fix this for the example application.Figure 41: Setting the Length for the capture to 2 seconds.6.Select “Start” on the instrument to start saving data, and then Select “Stop” when the desireddata capture is completed.Note: This will overwrite any data stored previously in the “.idf” file created earlier. If the data should not be rewritten follow Steps 1-2 again between captures an Create/Select a “.idf” file with a different name.7.Convert the “.idf” file to a MATLAB“.mat”file by Selecting “Convert IDF File…” from the“Tools” menu on the ControlDesk main menu, and then Selecting the “.idf” file containing the saved data and Selecting/Creating the “.mat” file the converted data should be saved to using the “Source File” and “Destination File(s)” “…” buttons and Selecting the “Convert”button.Figure 43: Converting an .idf file to a .mat file.8.Open the “.mat” file from the location it was saved to on the drive.Figure 44: Open the .mat file.9.Select the “Finish’ button from the MATLAB “Import Wizard” dialog box that opens. Figure 45: MATLAB Import Wizard dialog box.10.From the MATLAB “Workspace”, Double-click (or Right-click and Select “OpenSelection”) the structure with the same name as the “.mat” file to open the “Variable Editor”for the file.11.Plot the data (or manipulate it in some other manner).∙The “X” structure contains the time values in its “Data” array.∙The values for the variables that were recorded are found in the “Data” arrays for each “<1x1 struct>” of the “Y” structure. To determine which variable is found in each “<1x1 struct>” of “Y”, Double-click the structure to open it and look at the “Value” of its“Name” label. (See figure 47 on next page.)∙The full identifying label for each variable can be found at the top of the “Vari able Editor” window when it is open.∙Example MATLAB code to plot both variables from the figures in this section on the same plot:>> plot(data_5_6.X.Data, data_5_6.Y(1,1).Data) %in or RPM_in>> hold on>> plot(data_5_6.X.Data, data_5_6.Y(1,2).Data) %out or RPM_out>> hold off(Plot shown in figure 46 on the next page.)Motor Speed Control Application1.Construct the motor subsystem shown in the figure below, also connecting the opticalencoder and code wheel to the internal motor shaft and adding the brake. Also add the 5 Volt power connection and the 2.7 kΩ pull-up resistors between 5 Volts and the encoder channels,A and B. Verify 5 Volt and 25 Volt DC power supplies are set correctly before connecting tothe system.Figure 48: Motor Hardware Schematic.For the motor-optical encoder system provided at Bradley University, the motor and optical encoder connections are shown in the figure on the next page. The pin assignment for theTIP120 NPN transistor is shown in the figure below.2.Make all connections between the Connector Panel, the encoder and the Motor System. Therequired connections to the Slave I/O and Inc1 connectors are shown in the figures that follow.Note: Colors listed are for the wires used on the current version of the connectors at Bradley University.Figure 51: PWM connections on Slave I/O connector.Figure 52: Encoder Connections to/from Inc1 connector.Note: Once code has been downloaded at later steps of these instructions, it is generally best to turn the power supplies on after downloading the code and turn them off before stopping the code from running in ControlDesk.3.Now that all the hardware connections are complete, the work with ControlDesk andSimulink can begin. Start by following the instructions in the sections of this tutorial labeled:a.Setup/Startupb.Detecting the DS1103c.Creating a New Simulink ModelLeave the model open after saving it or re-open it using the instructions in the “Opening MATLAB/Simulink” section.4.Now, Add the DS1103 dSPACE blocks needed for PWM generation and Encoder inputcapture can be added. These blocks are found in the “Simulink Library Browser” under the “dSPACE RTI1103” heading on the left menu window.Figure 53: Location of dSPACE DS1103 blocks in the Simulink Library Browser.4a. Locate the PWM block labeled “DS1103SL_DSP_PWM” at: dSPACE RTI1103 ► DS1103 SLAVE DSP ► DS1103SL_DSP_PWM. Click and Drag the block into the model created for the project.Figure 54: Locating and Adding the PWM block.4b. Some features such as the encoder blocks require more than one block to function. One block has outputs. The other block is for more general settings that would also apply to other related (encoder) blocks if they were used.Locate the Encoder blocks labeled “DS1103ENC_SETUP”and “DS1103ENC_POS_C1” at: dSPACE RTI1103 ► DS1103 MASTER PPC ► DS1103ENC_SETUP.Andd SPACE RTI1103 ► DS1103 MASTER PPC► DS1103ENC_POS_C1.Click and Drag both blocks into the model created for the project.Figure 55: Locating and Adding the encoder blocks.5.Add and Connect constant, gain, terminator, and ground blocks to the Simulink project thensave the project, but do not close it.a.Add a constant block and connect it to “PWM Channel 1” of the PWM block. Set itsvalue to a number between 0 and 1. Change the label o f the block to “DutyCycle”.(This is the range for the input to the block as a percentage (0.5 = 50%) of the dutycycle.)b.Connect gain blocks to “Enc position” and “Enc delta position”. Set the gain of theseblocks to “1”. Label the connections going in to or out of these blocks “Enc1” and“Enc2”. (If these gain blocks are not added at this point, the outputs will probably notbe monitorable in ControlDesk later.)c.Connect the “PWM Channel 2”, “PWM Channel 3”, and “PWM Channel 4” inputs tothe PWM block to ground since they are not being used in this project. (Anyconnections that are open need to be attached to either a terminator or ground.)d.Connect the output of the gain blocks to terminator blocks.Figure 56: Simulink model after adding blocks and connections and saving. The DutyCycle is set to 50%.6.Change the Properties/Settings/Parameters of the PWM block. (No encoder settings need tobe changed since the “Inc1” connector input is being used.) To do this, Right-click the block and Select “Open Block” from the drop down menu. Then, change the appropriate settings.Change the following DS1103SL_DSP_PWM Settings in the dialog box that appears:a.“Unit” tab: Frequency = 12000 Hzb.“Initi a lization” tab: For Channel 1: PWM Sto p = “output with duty cycle”, Range = 0(The ST2PWM output being used is Channel 1 of this block.)c.“PWM Stop and Termination” tab: Remove check from box for “set Ch” X for allchannels.Figure 57: PWM block settings.7.Change th e “Sample time” of the Gain blocks to “1/12000 seconds” by Right-clicking theblocks, Selecting “Gain Parameters…”, and Changing the “Sample time” in each block to “1/12000”on the “Main” tab of the dialog window that appears.Figure 58: Changing the sampling time of gain blocks.8.Connect the channels of an oscilloscope to the PWM output and one of the channels of theoptical encoder in the hardware circuit.9.Build and Download the model to the DS1103 board using the instructions found in thesection of this tutorial labeled “Building/Downloading a Model”, setting the “Fixed-step size” for the model to “1/12000”. (When this step is complete, the system should be running and the DutyCycle should be initialized to the value set in the model.)10.Now, it is time to have some fun with ControlDesk. Create a layout in ControlDeskfollowing the directions in the “Monitoring/Controlling/Recording Values” section of this tutorial. Connect the following variables/values to the type of instrument(s) indicated.a.DutyCycle: Slider (Change Max Range to “1”) and Display and PlotterArrayb.Enc1: Displayc.Enc2: DisplayFigure 59: Layout in ControlDesk with system running and slider used to change the DutyCycle.11.Observe that changing the DutyCycle value using the slider changes the duty cycle of thePWM measurement on the oscilloscope to a similar percentage and changes the encoder frequency observed. Also observe that the DutyCycle has approximately a 12 kHz frequency using the oscilloscope.12.Observe that in the case of this system, the absolute value of the Enc1 output on theControlDesk Layout generally increases since the motor shaft is only rotating in onedirection and it is probably measuring distance. Multiplying the Enc2 output on theControlDesk Layout by the inverse of the sampling time (the frequency), 12000 in this case should approximately correspond to the Encoder frequency reported on the oscilloscope.13.Now, Delete the instruments from the ControlDesk layout and save it. Also, Delete the“DutyCycle” and “Gain” blocks from the Simulink model, Delete the “Enc1” label, and reconnect the “Enc position” output to its terminator block. Save the model.Figure 60: Simulink model after Step 13 is completed.。
考虑转速滤波的永磁同步电动机转速伺服系统改进型自抗扰控制器
考虑转速滤波的永磁同步电动机转速伺服系统改进型自抗扰控制器左月飞;符慧;刘闯;张捷;胡烨【摘要】在永磁同步电动机伺服系统中,通常根据位置信号采用M法计算转速.由于位置信号存在量化误差等原因,计算转速存在测量噪声,因此常将滤波后的转速作为反馈.在传统的转速一阶自抗扰控制系统中,自抗扰控制器的设计过程并未考虑转速滤波环节的影响,这将使系统性能受滤波时间常数的影响.提出一种考虑反馈转速滤波环节的改进型自抗扰控制器,将滤波后的转速扩张为一个新状态量,利用三阶线性扩张状态观测器估计滤波之前的转速量,并将其作为反馈.实验结果表明,改进型自抗扰控制系统具有较好的控制性能.【期刊名称】《电工技术学报》【年(卷),期】2016(031)009【总页数】9页(P137-145)【关键词】永磁同步电动机;自抗扰控制;转速计算;测量噪声;滤波器;扩张状态观测器【作者】左月飞;符慧;刘闯;张捷;胡烨【作者单位】南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016;南京航空航天大学自动化学院南京 210016【正文语种】中文【中图分类】TM351永磁同步电动机(Permanent Magnet Synchrounous Motor,PMSM)以其高功率/重量比、高转矩/惯量比、高效率和具有一定鲁棒性等优点逐渐取代直流电机和其他电励磁的电动机,在中小功率高精度转速伺服系统中被广泛应用。
在航空航天、机器人、数控机床等领域,通常要求电动机转速伺服系统具有快速准确的响应,且受到外界扰动后能够快速恢复。
传统的线性PI控制难以满足高性能的要求。
随着永磁同步电动机非线性控制理论的发展,多种先进的复杂控制策略如自适应控制[1,2]、模糊控制[3]、滑模变结构控制[4,5]等被应用于转速伺服系统。
尽管这些方法最终都能抑制扰动,但其依靠反馈控制,动态过程非常缓慢。
【免费】-》导引头伺服系统隔离度与测试
收稿日期 :2008212223 ;修订日期 :2009203213. 基金项目 :国防预研基金资助项目 (No . 10401020202a)
1994
光学 精密工程
第 17 卷
1 引 言
导弹在飞行过程中 ,由于发动机和空气阻力 等因素的影响 ,弹体始终处于剧烈振动摇摆中。 这种扰动不但会影响导引头的目标位置测量精 度 ,而且会影响目标的识别甚至导致导引头无法 捕获与跟踪目标[122] 。导引头通常采用两轴两框 架机构 ,利用陀螺的惯性速率测量功能构成稳定 平台来隔离载体扰动并跟踪目标 。隔离度是指导 引头伺服系统对弹体扰动的去耦能力 ,是评价导 引头伺服系统扰动隔离性能的一个重要指标 。如 何简单高效地测试隔离度对提高导引头伺服系统 的开发效率具有重要意义 。目前常用的测试法是 使用飞行仿真转台模拟弹体扰动 ,使用 PSD 或 CCD 测量隔离后的扰动[324 ] ,这种方法可以获得 较高的测量精度 ,但是测试系统组成复杂 ,数据处 理难度较高 ,测试过程耗时较长 ,比较适用于系统 最后的性能检验 ,而不太适用于系统的开发过程 。 本文将从分析导引头伺服系统的扰动隔离原理入 手 ,提出一种适用于伺服系统调试阶段的 、基于 dSPACE 半实物仿真系统的隔离度测试方法 。
统为间接稳定式[6] 。此时陀螺输出为弹体在惯性
空间的角速度 。由式 (1) 可得 :
λ = + o y
gyro_ y
y
iz = ( gyro_ x si n λy +
gyro_ z co s λy ) +λz .
(3)
显然 ,将弹体扰动角速度通过姿态变换可获
得框架在惯性空间的角速度 , 以此构成稳定回路
Disturbance isolation index of seeker servo system and its test
dspace配置的优缺点比较
dSPACE*** 基于Matlab/Simulink平台***实时快速原型及硬件在回路仿真的一体化解决途径1概述在当今社会,市场对产品的需求呈现多样性、快速性的趋势,这就使企业的新品开发面临着多样性需求与快速开发之间的矛盾;同时对控制系统鲁棒性及可靠性的要求也日益增加;另外并行工程(即:设计、实现、测试和生产准备同时进行)被提上了日程。
DSPACE 的产品为并行工程的实现创造了一个良好的环境。
对于进行控制算法研究的工程师而言,最头疼的莫过于没有一个方便而又快捷的途径,可以将他们用控制系统设计软件 (如MATLAB/Simulink) 开发的控制算法在一个实时的硬件平台上实现,以便观察与实际的控制对象相连时,控制算法的性能;而且,如果控制算法不理想,还能够很快地进行反复设计、反复试验直到找到理想的控制方案。
对一些大型的科研应用项目,如果完全遵循过去的开发过程,由于开发过程中存在着需求更改,软件代码甚至代码运行硬件环境不可靠(如:新设计制造的控制单元存在缺陷)等问题,最终导致项目周期长、费用高,缺乏必要的可靠性,甚至还可能导致项目以失败告终。
这就要求在开发的初期阶段就引入各种试验手段,并有可靠性高的实时软/硬件环境做支持。
另外,当产品型控制器生产出来后,测试工程师又将面临一个严重的问题。
由于并行工程的需求,控制对象可能还处于研制阶段,或者控制对象很难得到,用什么方法才能在早期独立地完成对控制器的测试呢?我们将这些问题概括为两种:快速控制原型(RCP)和硬件在回路仿真(HILS)。
d SPACE 提供了这两方面应用的统一平台。
2Dspace介绍dSPACE实时仿真系统是由dSPACE公司开发的一套基于MA TLAB/Simulink的控制系统开发及测试的工作平台,实现了和MATLAB/Simulink的完全无缝连接。
dSPACE实时系统拥有具有高速计算能力的硬件系统,包括处理器、I/O等,还拥有方便易用的实现代码生成/下载和试验/调试的软件环境。
DSPACE应用简介
dSPACE 实时仿真平台软件环境及应用一、dSPACE 简介dSPACE实时仿真系统是由德国dSPACE公司开发的一套基于MATLAB/Simulink 的控制系统在实时环境下的开发及测试工作平台,实现了和MATLAB/Simulink 的无缝连接。
dSPACE 实时系统由两大部分组成,一是硬件系统,二是软件环境。
其中硬件系统的主要特点是具有高速计算能力,包括处理器和I/O 接口等;软件环境可以方便地实现代码生成/下载和试验调试等工作。
dSPACE 具有强大的功能,可以很好地完成控制算法的设计、测试和实现,并为这一套并行工程提供了一个良好的环境。
dSPACE 的开发思路是将系统或产品开发诸功能与过程的集成和一体化,即从一个产品的概念设计到数学分析和仿真,从实时仿真实验到实验结果的监控和调节都可以集成到一套平台中来完成。
dSPACE 的软件环境主要由两大部分组成,一部分是实时代码的生成和下载软件RTI(Real-Time Interface),它是连接dSPACE 统与MATLAB/Simulink 纽带,通过对RTW(Real-Time Workshop)进行扩展,可以实现从Simulink 模型到dSPACE 实时硬件代码的自动下载。
另一部分为测试软件,其中包含了综合实验与测试环境(软件)ControlDesk、自动试验及参数调整软件MLIB/MTRACE、PC 与实时处理器通信软件CLIB 以及实时动画软件RealMotion 等。
二、dSPACE的优点dSPACE 实时仿真系统具有许多其它仿真系统具有的无法比拟的优点:1、dSPACE 组合性很强。
2、dSPACE 的过渡性和快速性好。
由于dSPACE 和MATLAB 的无缝连接,使MATLAB 用户可以轻松掌握dSPACE 的使用,方便地从非实时分析、设计过渡到实时的分析和设计上来,大大节省了时间和费用。
3、性能价格比高。
dSPACE 是一个操作平台,它可用于许多产品的开发或实时仿真测试,而不是一物一用。
基于dSPACE的实时控制系统设计
万方数据
2010.11 I机电一体化翩
基于dSPACE的实时控制系统设计iI—I I—_—_———I—I——IIIII——III—————II———IIIIII——一————————I————蕊II
一暑要趟番一避林.蝾如昌}.翊一鳋粗毯蜃
●一 ■
0l
2 3 4 5 6 7 8 9 10 ll 12 13 14
∞机电一体化I 2010.”
万方数据
I———i蔷i 磊iiiiiiiiiiiiiiiiii—l liii——I I—————I N—I——————IIII—ii—l l—l l—l——II
Application·Communication
态误差逐渐变小。但积分作用太强,系统超调相应加 大,积分作用过大会导致系统出现振荡。如图7所示, 当K:=200时,系统的超调量约为3%。而当Ki=300 时,超调阜=约为7%。两者的稳态误差均小于l%,故取 定K;=200。
作为仿真系统的一个环节,直接与控制器相连,无需用 户建立被控对象的数学模型和传递函数。Simulink编 写的仿真程序直观易懂,用户能实时修改算法,调整控 制参数,且能与dSPACE实现无缝连接。
控制算法框图如图3所示。ENC—POS模块和DAC 模块从dSPACE系统提供的模块库中直接获取,实现与 电机驱动器的通讯功能。本文中,在驱动器中实现速 度环和电流环,控制器实现位置环。ENC—POS模块对 编码器接口获得的光栅尺反馈信号进行处理,输出位 置脉冲计数和速度差分信号。由参考位置信号与反馈 位置信号相减得到的位置偏差,经过PID控制器,斜率 限制模块和抗饱和模块后,计算得到相应的0—10 V模 拟量,经由DAC模块输出,传送给驱动器,控制电机运 动。其中,斜率限制模块防止控制信号变化过快对系统 造成损害,抗饱和模块限制控制信号在0一lo V范围内。
DSPACE应用简介
dSPACE 实时仿真平台软件环境及应用一、dSPACE 简介dSPACE实时仿真系统是由德国dSPACE公司开发的一套基于MATLAB/Simulink 的控制系统在实时环境下的开发及测试工作平台,实现了和MATLAB/Simulink 的无缝连接。
dSPACE 实时系统由两大部分组成,一是硬件系统,二是软件环境。
其中硬件系统的主要特点是具有高速计算能力,包括处理器和I/O 接口等;软件环境可以方便地实现代码生成/下载和试验调试等工作。
dSPACE 具有强大的功能,可以很好地完成控制算法的设计、测试和实现,并为这一套并行工程提供了一个良好的环境。
dSPACE 的开发思路是将系统或产品开发诸功能与过程的集成和一体化,即从一个产品的概念设计到数学分析和仿真,从实时仿真实验到实验结果的监控和调节都可以集成到一套平台中来完成。
dSPACE 的软件环境主要由两大部分组成,一部分是实时代码的生成和下载软件RTI(Real-Time Interface),它是连接dSPACE 统与MATLAB/Simulink 纽带,通过对RTW(Real-Time Workshop)进行扩展,可以实现从Simulink 模型到dSPACE 实时硬件代码的自动下载。
另一部分为测试软件,其中包含了综合实验与测试环境(软件)ControlDesk、自动试验及参数调整软件MLIB/MTRACE、PC 与实时处理器通信软件CLIB 以及实时动画软件RealMotion 等。
二、dSPACE的优点dSPACE 实时仿真系统具有许多其它仿真系统具有的无法比拟的优点:1、dSPACE 组合性很强。
2、dSPACE 的过渡性和快速性好。
由于dSPACE 和MATLAB 的无缝连接,使MATLAB 用户可以轻松掌握dSPACE 的使用,方便地从非实时分析、设计过渡到实时的分析和设计上来,大大节省了时间和费用。
3、性能价格比高。
dSPACE 是一个操作平台,它可用于许多产品的开发或实时仿真测试,而不是一物一用。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
DS1103 PPC 控制器
DS1103 PPC 控制器板,这是迄今为止所有单板系统中功能最强大、I/O 最丰富的开发系统。
为了不给开发带来任何限制,DS1103使用了PowerPC 处理器来进行浮点运算(400MHz)。
对于新型控制器的开发而言,dSPACE 的单板方案是功能强大而又可以信赖的工具。
单板方案提供了控制器方案设计及代码生成和下载所需的一切,使RCP 更加方便易行。
DS1103 PPC 控制器拥有大量I/O 接口,使其可以满足RCP 的要求。
DS1103 PPC 控制器板除36 路ADC、8 路DAC 以外还配有数字I/O。
同时,DS1103 PPC 控制器板还集成了一个以TI 公司的TMS320F240 DSP 为核心的I/O 子系统,可用来满足特殊的I/O 要求。
这种DSP 可提供三相PWM 信号发生器,尤其适于驱动方面的应用。
DS1103 拥有6 路数字增量编码器接口,可以方便的应用于机器人的设计。
DS1103 还配有一个测速控制器,可用来对数字或模拟增量编码器位置信号进行解析,这使其可以应用于电气驱动控制。
DS1103 还集成了Simens 的CAN 控制器,使其也可以适应汽车及自动化方面的应用。
DS1103 可以方便地插入PC 机中。
由PC 机负责提供电源,完成程序下载。
所有的实时计算都是由PPC 控制器板独立执行。
只有dSAPCE 的试验工具软件并行运行于主机上。
技术特性:
●Motorola PowerPC 604e/400MHz
●Superscalar 微处理器
●10.1 SPECfp95,15.9 SPECint95
● 3 个整型单元,1 个浮点单元
● 2 个片内定时器单元
●32Kbyte 指令缓存
●32Kbyte 数据缓存
●快速无序指令执行(Fast out-of-order instruction execution)
定时器:2 个通用定时器
存储器:
●2MByte 局部SRAM,程序存储器,缓存,无等待状态
●128Mbyte 全局DRAM,用于存储数据及与主机进行数据
中断电控单元:
●主机中断,CAN 中断,从DSP 中断,串口中断,增量编码器中断,4 路外部中断●PWM 同步中断
模拟输入(ADC):
●16 路16 位通道(4-1 多路输出,4 采样保持单元),4μs 采样时间(250KHz) ● 4 路12 位通道,采样保持,800ns 采样时间(1.25MHz)
●输入电压范围:±10V
●>65db 信噪比
模拟输出(DAC):
●8 路14 位通道
●典型建立时间:5μs
●输出电压范围:±10V
数字I/O
●可独立编程通道
● 4 通道8 位数字I/O 口
增量编码器子系统:
● 6 通道数字输入
●数字噪音滤波器
●最大1.65MHz 输入频率,例如四倍脉冲计数频率能达:6.6MHz
●TC 3005H:带有附加模拟输入
串行接口:
●支持RS232、RS422 收发器
●最大1Mbaud 的波特率
CAN 接口:
●Siemens 80C164 微处理器
●ISO 11898 收发器
●时钟频率发生器
●4Kword 双端口存储器
从DSP 子系统:
●TI 公司的TMS320F240 DSP,20MHz,为电机控制而设计
●独立子系统
●4Kword 双端口RAM
●支持对称及非对称PWM 和空间矢量调制
●三相PWM 输出,外加4路单PWM 输出
● 4 路记录输入
● 2 个ADC 单元,每单元8 路输入,10 位,采样保持,6.6μs
●18 位数字I/O(TTL),可单独编程
物理特性:
●供电:5V,6A;-12V,250mA;+12V,750mA
●过温传感器
●16 位ISA 总线插槽
●支持即插即用(Plug&Play)BIOS
●I/O 接口:3×100 SUB-D 型接插键(High-density)共占用三个ISA 插槽●可与I/O 端子板相连:CLP1103(带指示灯)及CP1103。