- 浏览: 311472 次
- 性别:
- 来自: 成都
-
文章分类
- 全部博客 (118)
- VS2008 (2)
- JAVA (34)
- AJAX (1)
- C# (1)
- Flex (16)
- FMS (6)
- SQLSERVER (1)
- ORACLE (1)
- Quartz (1)
- struts2 (1)
- java数据结构 (1)
- java设计模式 (3)
- JSF (0)
- web (2)
- jbpm4 (4)
- J2EE (1)
- webservice (2)
- javascript (8)
- spring (3)
- lucene (0)
- linux (9)
- ibatis (1)
- JPA (2)
- 外挂 (0)
- VB (0)
- Hibernate (1)
- OSGI (8)
- EXT (4)
- Maven (1)
- SpringSecurity (0)
- activiti (0)
- 项目开发 (0)
- 项目管理 (7)
- android (0)
- FFMPEG (1)
- C (2)
- eclipse (1)
最新评论
-
默默得守候在你的身边:
给力
java与Delphi写的dll交互 -
默默得守候在你的身边:
java与Delphi写的dll交互 -
fuguitong:
[url][url][url][url][url][url][ ...
doc转swf -
baidu_25402161:
到结束的时候一直 Can't delete processIn ...
一个请假单流程的实现(struts2.1.8+spring2.5+hibernate3集成jbpm4.3) -
lohaoo1:
nice!
java面包屑导航制作
用到的有三个类,BrokenLine.as,BrokenLineEdge.as,BrokenLineRect.as,效果如图:
当拖到直线后可以折回去。
源码在附件上。有bug的话希望提出来哈。谢谢。
svn地址http://forever-framework.googlecode.com/svn/design/,
箭头效果已经做好了。在svn上。
箭头的制作参照了这位师兄的内容http://zean.iteye.com/blog/1070471
核心类:
package org.forever.view { import flash.events.MouseEvent; import flash.geom.Point; import mx.collections.ArrayList; import mx.core.UIComponent; import mx.logging.ILogger; import mx.logging.Log; import mx.utils.UIDUtil; import spark.components.BorderContainer; import spark.components.SkinnableContainer; /** * 折线的实现(初始化状态是3点两边) */ public class BrokenLine extends UIComponent { private var _app_container:SkinnableContainer; private static var _log:ILogger = Log.getLogger("org.forever.view.BrokenLine"); private var _fromPoint:Point; private var _toPoint:Point; private var _firstRect:BrokenLineRect; private var _secondRect:BrokenLineRect; private var _thirdRect:BrokenLineRect; private var _firstEdge:BrokenLineEdge; private var _rect_w:Number = 6; private var _startMove:Boolean = false; private var _moving:Boolean = false; private var _currentClickRect:BrokenLineRect; private var _rectList:ArrayList; private var _edgeList:ArrayList; public function BrokenLine() { } /**画折线的方法*/ public function draw():void{ initContainer(); _firstRect = new BrokenLineRect(); _secondRect = new BrokenLineRect(); _thirdRect = new BrokenLineRect(); _firstEdge = new BrokenLineEdge(); initFirstRect(); initSecondRect(); initThirdRect(); initFirstEdge(); //建立矩形关联边 _firstRect.secondEdge = _firstEdge; _secondRect.firstEdge = _firstEdge; //建立边关联矩形 _firstEdge.firstRect = _firstRect; _firstEdge.secondRect = _secondRect; //建立矩形关联的矩形 _firstRect.nextRect = _thirdRect; _secondRect.prevRect = _thirdRect; _thirdRect.prevRect = _firstRect; _thirdRect.nextRect = _secondRect; //添加顺序导致组件的重叠z轴顺序 addChild(_firstEdge); addChild(_firstRect); addChild(_thirdRect); addChild(_secondRect); _rectList = new ArrayList(new Array(_firstRect,_thirdRect,_secondRect)); _edgeList = new ArrayList(new Array(_firstEdge)); } /**初始化容器事件*/ public function initContainer():void{ _app_container.addEventListener(MouseEvent.MOUSE_MOVE,appContainerMouseMoveHandler); _app_container.addEventListener(MouseEvent.MOUSE_UP,appContainerMouseUpHandler); } /**获取指定两个矩形的距离,AB=√[(x1-x2)²+(y1-y2)²]*/ public function getDistance(firstRect:BrokenLineRect,secondRect:BrokenLineRect):Number{ return Math.sqrt(Math.pow(firstRect.x - secondRect.x,2) + Math.pow(firstRect.y - secondRect.y,2)); } /**处理拖动180度直线后,去掉左右控制点的方法*/ public function process180():Boolean{ if(_currentClickRect.isSplit){//是拆分过的控制点 var a:Number = getDistance(_currentClickRect,_currentClickRect.prevRect); var b:Number = getDistance(_currentClickRect,_currentClickRect.nextRect); var c:Number = getDistance(_currentClickRect.prevRect,_currentClickRect.nextRect); var cosC:Number=(a*a+b*b-c*c)/(2*a*b); //求出控制点拖动时夹角的及时角度 var acos:Number =(int)(Math.acos(cosC) * 180 / Math.PI); _log.debug("*************角度:"+acos+"**************"); if(_currentClickRect.direction==0 && acos<=165){//第一次将控制点拖动时,角度会逐渐变小,小于165度后确定为正方向 _currentClickRect.direction = 1; _log.debug("*************正方向拖动中**************"); }else if(_currentClickRect.direction==1 && acos>=165){//如果满足正方向拖动后,在往反方向拖动,角度会逐渐变大,大于165度后确定为反方向 _currentClickRect.direction = -1; _log.debug("*************反方向拖动中**************"); } //如果反方向行动,并且角度在指定范围内,去掉前后控制点 if(_currentClickRect.direction==-1 && acos>=176 && acos<=180){ _log.debug("*************进入去掉前后控制点范围**************"); //获取当前控制点矩形的前驱前驱矩形和后继后继矩形 var prevPrevRect:BrokenLineRect = _currentClickRect.prevRect.prevRect; var nextNextRect:BrokenLineRect = _currentClickRect.nextRect.nextRect; //将当前控制点矩形的前驱矩形和后继矩形从容器界面中移除 this.removeChild(_currentClickRect.prevRect); this.removeChild(_currentClickRect.nextRect); //更新各个控制点的关联关系 _currentClickRect.prevRect = prevPrevRect; _currentClickRect.nextRect = nextNextRect; prevPrevRect.nextRect = _currentClickRect; nextNextRect.prevRect = _currentClickRect; //if(prevPrevRect!=_firstRect){//头矩形没有第一条边 //prevPrevRect.firstEdge = _currentClickRect.secondEdge; //} prevPrevRect.secondEdge = _currentClickRect.secondEdge; _currentClickRect.secondEdge.firstRect = prevPrevRect; _currentClickRect.secondEdge.drawLine(); updateRectTop(_currentClickRect.secondEdge); this.removeChild(_currentClickRect.firstEdge); _currentClickRect.firstEdge = null; _currentClickRect.secondEdge = null; _currentClickRect.isSplit = false; _currentClickRect.x = (_currentClickRect.prevRect.x + _currentClickRect.nextRect.x)/2; _currentClickRect.y = (_currentClickRect.prevRect.y + _currentClickRect.nextRect.y)/2; _moving = false; _startMove = false; _currentClickRect.direction = 0; return true; } } return false; } public function appContainerMouseMoveHandler(event:MouseEvent):void{ if(_moving){ _currentClickRect.x = mouseX; _currentClickRect.y = mouseY; if(process180())return; _currentClickRect.refresh(); } } public function appContainerMouseUpHandler(event:MouseEvent):void{ if(_moving && null != _currentClickRect){ _startMove = false; _moving = false; //_log.debug(_currentClickRect.desc + "结束移动......"); } } public function addRectEvent(rect:BrokenLineRect):void{ rect.addEventListener(MouseEvent.MOUSE_DOWN,rectMouseDownHandler); rect.addEventListener(MouseEvent.MOUSE_MOVE,rectMouseMoveHandler); rect.addEventListener(MouseEvent.MOUSE_UP,rectMouseUpHandler); } /**矩形鼠标释放事件,一旦释放,停止拖动*/ public function rectMouseUpHandler(event:MouseEvent):void{ _startMove = false; _moving = false; //_log.debug(_currentClickRect.desc + "结束移动......"); } public function rectMouseDownHandler(event:MouseEvent):void{ _startMove = true;//点击组件做移动准备 _moving = false;//并未真正移动 _currentClickRect = event.currentTarget as BrokenLineRect; _currentClickRect.print(); //_log.debug(_currentClickRect.desc + "被点击,准备开始移动......坐标:x=" + _currentClickRect.x + "y=" + _currentClickRect.y ); } public function rectMouseMoveHandler(event:MouseEvent):void{ if(_startMove && !_moving){//如果准备好移动 //既不是头矩形,也不是尾矩形,也没有拆分过 if(_currentClickRect != _firstRect && _currentClickRect!=_secondRect && !_currentClickRect.isSplit){ var _newRectOne:BrokenLineRect = createRect();//新增第一个控制点矩形 //该矩形是当前控制点矩形和前驱矩形的中间矩形 _newRectOne.x = (_currentClickRect.x + _currentClickRect.prevRect.x)/2; _newRectOne.y = (_currentClickRect.y + _currentClickRect.prevRect.y)/2; _newRectOne.desc = UIDUtil.createUID(); //新增第二个控制点矩形,该矩形是当前控制点矩形和后继矩形的中间矩形 var _newRectTwo:BrokenLineRect = createRect(); _newRectTwo.x = (_currentClickRect.x + _currentClickRect.nextRect.x)/2; _newRectTwo.y = (_currentClickRect.y + _currentClickRect.nextRect.y)/2; _newRectTwo.desc = UIDUtil.createUID(); //获取当前控制点前驱控制点的第二条关联边 var _secondEdge:BrokenLineEdge = _currentClickRect.prevRect.secondEdge; //更新关联边的第一个控制点为当前控制点 _secondEdge.firstRect = _currentClickRect; //更新关联边的第二个控制点为当前控制点的后继控制点 _secondEdge.secondRect = _currentClickRect.nextRect; //更新当前矩形的第二条关联边 _currentClickRect.secondEdge = _secondEdge; //重绘边 _secondEdge.drawLine(); updateRectTop(_secondEdge);//将该边的两端控制点置顶 //新增一条边,建立该节点与前驱节点的边关系 var _newEdge:BrokenLineEdge = new BrokenLineEdge(); _newEdge.firstRect = _currentClickRect.prevRect; _newEdge.secondRect = _currentClickRect; _newEdge.desc = UIDUtil.createUID(); _newEdge.drawLine(); addChild(_newEdge); addChild(_newRectOne); addChild(_newRectTwo); updateRectTop(_newEdge); //更新当前控制点矩形的前驱矩形的关联边为新边 _currentClickRect.prevRect.secondEdge = _newEdge; //更新当前控制点矩形的第一条关联边 _currentClickRect.firstEdge = _newEdge; //更新控制点矩形之间的引用关系 _currentClickRect.prevRect.nextRect = _newRectOne; _currentClickRect.nextRect.prevRect = _newRectTwo; _newRectOne.prevRect = _currentClickRect.prevRect; _newRectOne.nextRect = _currentClickRect; _newRectTwo.prevRect = _currentClickRect; _newRectTwo.nextRect = _currentClickRect.nextRect; _currentClickRect.prevRect = _newRectOne; _currentClickRect.nextRect = _newRectTwo; _currentClickRect.isSplit = true;//标记为已拆分 //添加到集合中 _edgeList.addItem(_newEdge); } _moving = true; _log.debug(_currentClickRect.desc + "移动中......坐标:x=" + _currentClickRect.x + "y=" + _currentClickRect.y); } } /**创建一个新的矩形点*/ public function createRect():BrokenLineRect{ var _newRect:BrokenLineRect = new BrokenLineRect(); _newRect.width = _rect_w; _newRect.height = _rect_w; _newRect.setStyle("borderColor","#70B2EE"); addRectEvent(_newRect); return _newRect; } /**更新指定边的两端矩形置顶*/ public function updateRectTop(_edge:BrokenLineEdge):void{ this.setChildIndex(_edge.firstRect,this.numChildren-1); this.setChildIndex(_edge.secondRect,this.numChildren-1); } /**初始化第一个端点到中点的边*/ public function initFirstEdge():void{ _firstEdge.firstRect = _firstRect; _firstEdge.secondRect = _secondRect; _firstEdge.desc = UIDUtil.createUID(); _firstEdge.drawLine(); } /**初始化中点矩形*/ public function initThirdRect():void{ _thirdRect.width = _rect_w; _thirdRect.height = _rect_w; _thirdRect.setStyle("borderColor","#70B2EE"); _thirdRect.x = (_firstRect.x + _secondRect.x)/2; _thirdRect.y = (_firstRect.y + _secondRect.y)/2; _thirdRect.desc = "_thirdRect"; addRectEvent(_thirdRect); } /**初始化第二个端点的矩形*/ public function initSecondRect():void{ _secondRect.width = _rect_w; _secondRect.height = _rect_w; _secondRect.x = _toPoint.x; _secondRect.y = _toPoint.y - _secondRect.height/2; _secondRect.setStyle("borderColor","#70B2EE"); _secondRect.desc = "_secondRect"; addRectEvent(_secondRect); } /**初始化第一个端点的矩形*/ public function initFirstRect():void{ _firstRect.width = _rect_w; _firstRect.height = _rect_w; _firstRect.x = _fromPoint.x - _firstRect.width; _firstRect.y = _fromPoint.y - _firstRect.height/2; _firstRect.setStyle("borderColor","#70B2EE"); _firstRect.desc = "_firstRect"; addRectEvent(_firstRect); } /******************* get and set ******************/ /**线终点*/ public function get toPoint():Point { return _toPoint; } /** * @private */ public function set toPoint(value:Point):void { _toPoint = value; } /**线起点*/ public function get fromPoint():Point { return _fromPoint; } /** * @private */ public function set fromPoint(value:Point):void { _fromPoint = value; } /**显示所有可变组件的容器*/ public function get app_container():SkinnableContainer { return _app_container; } /** * @private */ public function set app_container(value:SkinnableContainer):void { _app_container = value; } public function get moving():Boolean { return _moving; } public function set moving(value:Boolean):void { _moving = value; } } }
辅助类:
package org.forever.view { import flash.events.MouseEvent; import flash.geom.Point; import mx.core.UIComponent; import mx.logging.ILogger; import mx.logging.Log; /**折线用的线条边类*/ public class BrokenLineEdge extends UIComponent { private static var _log:ILogger = Log.getLogger("org.forever.view.BrokenLineEdge"); private var _fromPoint:Point; private var _toPoint:Point; private var _lineColor:uint=0x000000; private var _thickness:Number = 1; private var _alpha:Number = 1; private var _firstRect:BrokenLineRect; private var _secondRect:BrokenLineRect; private var _desc:String; public function BrokenLineEdge() { super(); _fromPoint = new Point(); _toPoint = new Point(); addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler); } public function mouseDownHandler(e:MouseEvent):void{ print(); } public function print():void{ _log.debug("*******************("+_desc+")信息************************************"); _log.debug("第一个端点矩形:"+_firstRect.desc); _log.debug("第二个端点矩形:"+_secondRect.desc); _log.debug("*********************************************************************"); } /**绘制线条*/ public function drawLine():void{ _log.debug("重绘边" + _desc + ";" + _firstRect.desc + ":" + _secondRect.desc); fromPoint.x = _firstRect.x + _firstRect.width/2; fromPoint.y = _firstRect.y + _firstRect.height/2; toPoint.x = _secondRect.x+_secondRect.width/2; toPoint.y = _secondRect.y + _secondRect.height/2; this.graphics.clear(); this.graphics.lineStyle(_thickness,_lineColor,_alpha); this.graphics.moveTo(_fromPoint.x,_fromPoint.y); this.graphics.lineTo(_toPoint.x,_toPoint.y); } /**线起点*/ public function get fromPoint():Point { return _fromPoint; } /** * @private */ public function set fromPoint(value:Point):void { _fromPoint = value; } /**线终点*/ public function get toPoint():Point { return _toPoint; } /** * @private */ public function set toPoint(value:Point):void { _toPoint = value; } /**线条颜色*/ public function get lineColor():uint { return _lineColor; } /** * @private */ public function set lineColor(value:uint):void { _lineColor = value; } /**关联的第一个端点*/ public function get firstRect():BrokenLineRect { return _firstRect; } /** * @private */ public function set firstRect(value:BrokenLineRect):void { _firstRect = value; } /**关联的第二个端点*/ public function get secondRect():BrokenLineRect { return _secondRect; } /** * @private */ public function set secondRect(value:BrokenLineRect):void { _secondRect = value; } public function get desc():String { return _desc; } public function set desc(value:String):void { _desc = value; } } }
控制点类:
package org.forever.view { import flash.events.MouseEvent; import mx.logging.ILogger; import mx.logging.Log; import spark.components.BorderContainer; /**折线用到的矩形点类*/ public class BrokenLineRect extends BorderContainer { private static var _log:ILogger = Log.getLogger("org.forever.view.BrokenLineRect"); private var _firstEdge:BrokenLineEdge; private var _secondEdge:BrokenLineEdge; private var _prevRect:BrokenLineRect; private var _nextRect:BrokenLineRect; private var _isSplit:Boolean = false; private var _rect_w:Number = 6; private var _count:Number = 0; private var _direction:Number = 0; private var _desc:String; public function BrokenLineRect() { } public function print():void{ _log.debug("*******************("+_desc+")信息************************************"); _log.debug("前驱矩形:" + (_prevRect!=null?_prevRect.desc:"没有前驱矩形")); _log.debug("后继矩形:" + (_nextRect!=null? _nextRect.desc:"没有后继矩形")); _log.debug("第一条关联边:" + (_firstEdge!=null? _firstEdge.desc:"没有第一条关联边")); _log.debug("第二条关联边:" + (_secondEdge!=null? _secondEdge.desc:"没有第二条关联边")); _log.debug("*********************************************************************"); } public function refresh():void{ updateFirstEdgePosition(); updateSecondEdgePosition(); updateNextRectPosition(); updatePrevRectPosition(); } /**更新第二条边的位置*/ public function updateSecondEdgePosition():void{ if(_secondEdge != null){ _secondEdge.drawLine(); } } /**更新后继矩形的位置*/ public function updateNextRectPosition():void{ if(_nextRect != null && _nextRect.nextRect != null){ _nextRect.x = (x + _nextRect.nextRect.x)/2; _nextRect.y = (y + _nextRect.nextRect.y)/2; } } /**更新前驱矩形的位置*/ public function updatePrevRectPosition():void{ if(_prevRect != null && _prevRect.prevRect != null){ _prevRect.x = (x + _prevRect.prevRect.x)/2; _prevRect.y = (y + _prevRect.prevRect.y)/2; } } /**更新第一条边的位置*/ public function updateFirstEdgePosition():void{ if(_firstEdge != null){ _firstEdge.drawLine(); } } public function updateFirstEdge():void{ if(_firstEdge != null ){ } } /**矩形关联的第一条边(左边)*/ public function get firstEdge():BrokenLineEdge { return _firstEdge; } /** * @private */ public function set firstEdge(value:BrokenLineEdge):void { _firstEdge = value; } /**矩形关联的第二条边(右边)*/ public function get secondEdge():BrokenLineEdge { return _secondEdge; } /** * @private */ public function set secondEdge(value:BrokenLineEdge):void { _secondEdge = value; } /**前驱矩形节点*/ public function get prevRect():BrokenLineRect { return _prevRect; } /** * @private */ public function set prevRect(value:BrokenLineRect):void { _prevRect = value; } /**后继矩形节点*/ public function get nextRect():BrokenLineRect { return _nextRect; } /** * @private */ public function set nextRect(value:BrokenLineRect):void { _nextRect = value; } /**是否拆分过,即创建了该矩形与前驱(后继)矩形的中点矩形*/ public function get isSplit():Boolean { return _isSplit; } /** * @private */ public function set isSplit(value:Boolean):void { _isSplit = value; } public function get desc():String { return _desc; } public function set desc(value:String):void { _desc = value; } /**拖动方向,0未初始化,1正方向,-1反方向*/ public function get direction():Number { return _direction; } /** * @private */ public function set direction(value:Number):void { _direction = value; } } }
发表评论
-
flex标尺的实现
2011-08-28 21:49 2247效果图: 组件类: package org.for ... -
flex设计器功能拆分之二(撤销与恢复)
2011-03-16 22:01 2590撤销与恢复主要用到了 ... -
flex设计器功能拆分之一(调整组件大小位置)
2011-03-13 13:02 2040只要是设计器就逃不脱对组件的动态调整。比如大小,位置是最常见的 ... -
flex4与JavaScript交互
2010-11-06 09:10 3062利用flex来开发程序很快,有时难免会和js交互. flex ... -
flex表格设计器
2010-07-17 19:30 5132未完,开发中...... 记录每次修改过程。 第一次开发, ... -
flex折线的实现
2010-06-10 17:17 2426看效果: 可以无限折: 带源码,欢迎交流 请查看htt ... -
flex视频播放器
2010-05-13 07:46 0wwew -
flex_java文件上传(一)
2010-05-09 22:34 1822功能如下: 能够批量上传勾上的文件,能够批量删除指定的文件 ... -
flex4正式版注册号
2010-04-10 21:54 1587网上找的,可以用 C:\WINDOWS\system32\d ... -
Chart之PieChart简单应用
2010-04-04 12:13 7191效果图: 功能:能够修改指定国家的获奖信息,能够指定要显示 ... -
Chart之ColumnChart简单应用
2010-04-04 10:03 2516效果图: 代码: <?xml version=&q ... -
flex4视频教程
2010-03-29 09:48 0http://you.video.sina.com.cn/vl ... -
flex视音频通讯-摄像头及麦克风检测
2010-03-29 09:44 958flex视音频通讯-摄像头及麦克风检测 <mx: ... -
在线中文api
2010-03-25 18:17 1553flex4注册码:1424-4008-9664-3602-34 ... -
flex框架集合
2010-02-27 09:10 10881月17日 Flex开源框架汇总 Cairngorm ... -
BlazeDS的初步使用
2009-11-26 11:30 2486刚接触这东西的时候去网上了解了哈,BlazeDS用于flex和 ... -
datagrid 嵌套单选按钮互斥方法
2009-11-24 11:20 1827在一次使用datagrid的时候,嵌入了单选按钮组件: 突 ...
相关推荐
内容概要:本文详细介绍了基于MATLAB GUI界面和卷积神经网络(CNN)的模糊车牌识别系统。该系统旨在解决现实中车牌因模糊不清导致识别困难的问题。文中阐述了整个流程的关键步骤,包括图像的模糊还原、灰度化、阈值化、边缘检测、孔洞填充、形态学操作、滤波操作、车牌定位、字符分割以及最终的字符识别。通过使用维纳滤波或最小二乘法约束滤波进行模糊还原,再利用CNN的强大特征提取能力完成字符分类。此外,还特别强调了MATLAB GUI界面的设计,使得用户能直观便捷地操作整个系统。 适合人群:对图像处理和深度学习感兴趣的科研人员、高校学生及从事相关领域的工程师。 使用场景及目标:适用于交通管理、智能停车场等领域,用于提升车牌识别的准确性和效率,特别是在面对模糊车牌时的表现。 其他说明:文中提供了部分关键代码片段作为参考,并对实验结果进行了详细的分析,展示了系统在不同环境下的表现情况及其潜在的应用前景。
嵌入式八股文面试题库资料知识宝典-计算机专业试题.zip
嵌入式八股文面试题库资料知识宝典-C and C++ normal interview_3.zip
内容概要:本文深入探讨了一款额定功率为4kW的开关磁阻电机,详细介绍了其性能参数如额定功率、转速、效率、输出转矩和脉动率等。同时,文章还展示了利用RMxprt、Maxwell 2D和3D模型对该电机进行仿真的方法和技术,通过外电路分析进一步研究其电气性能和动态响应特性。最后,文章提供了基于RMxprt模型的MATLAB仿真代码示例,帮助读者理解电机的工作原理及其性能特点。 适合人群:从事电机设计、工业自动化领域的工程师和技术人员,尤其是对开关磁阻电机感兴趣的科研工作者。 使用场景及目标:适用于希望深入了解开关磁阻电机特性和建模技术的研究人员,在新产品开发或现有产品改进时作为参考资料。 其他说明:文中提供的代码示例仅用于演示目的,实际操作时需根据所用软件的具体情况进行适当修改。
少儿编程scratch项目源代码文件案例素材-剑客冲刺.zip
少儿编程scratch项目源代码文件案例素材-几何冲刺 转瞬即逝.zip
内容概要:本文详细介绍了基于PID控制器的四象限直流电机速度驱动控制系统仿真模型及其永磁直流电机(PMDC)转速控制模型。首先阐述了PID控制器的工作原理,即通过对系统误差的比例、积分和微分运算来调整电机的驱动信号,从而实现转速的精确控制。接着讨论了如何利用PID控制器使有刷PMDC电机在四个象限中精确跟踪参考速度,并展示了仿真模型在应对快速负载扰动时的有效性和稳定性。最后,提供了Simulink仿真模型和详细的Word模型说明文档,帮助读者理解和调整PID控制器参数,以达到最佳控制效果。 适合人群:从事电力电子与电机控制领域的研究人员和技术人员,尤其是对四象限直流电机速度驱动控制系统感兴趣的读者。 使用场景及目标:适用于需要深入了解和掌握四象限直流电机速度驱动控制系统设计与实现的研究人员和技术人员。目标是在实际项目中能够运用PID控制器实现电机转速的精确控制,并提高系统的稳定性和抗干扰能力。 其他说明:文中引用了多篇相关领域的权威文献,确保了理论依据的可靠性和实用性。此外,提供的Simulink模型和Word文档有助于读者更好地理解和实践所介绍的内容。
嵌入式八股文面试题库资料知识宝典-2013年海康威视校园招聘嵌入式开发笔试题.zip
少儿编程scratch项目源代码文件案例素材-驾驶通关.zip
小区开放对周边道路通行能力影响的研究.pdf
内容概要:本文探讨了冷链物流车辆路径优化问题,特别是如何通过NSGA-2遗传算法和软硬时间窗策略来实现高效、环保和高客户满意度的路径规划。文中介绍了冷链物流的特点及其重要性,提出了软时间窗概念,允许一定的配送时间弹性,同时考虑碳排放成本,以达到绿色物流的目的。此外,还讨论了如何将客户满意度作为路径优化的重要评价标准之一。最后,通过一段简化的Python代码展示了遗传算法的应用。 适合人群:从事物流管理、冷链物流运营的专业人士,以及对遗传算法和路径优化感兴趣的科研人员和技术开发者。 使用场景及目标:适用于冷链物流企业,旨在优化配送路线,降低运营成本,减少碳排放,提升客户满意度。目标是帮助企业实现绿色、高效的物流配送系统。 其他说明:文中提供的代码仅为示意,实际应用需根据具体情况调整参数设置和模型构建。
少儿编程scratch项目源代码文件案例素材-恐怖矿井.zip
内容概要:本文详细介绍了基于STM32F030的无刷电机控制方案,重点在于高压FOC(磁场定向控制)技术和滑膜无感FOC的应用。该方案实现了过载、过欠压、堵转等多种保护机制,并提供了完整的源码、原理图和PCB设计。文中展示了关键代码片段,如滑膜观测器和电流环处理,以及保护机制的具体实现方法。此外,还提到了方案的移植要点和实际测试效果,确保系统的稳定性和高效性。 适合人群:嵌入式系统开发者、电机控制系统工程师、硬件工程师。 使用场景及目标:适用于需要高性能无刷电机控制的应用场景,如工业自动化设备、无人机、电动工具等。目标是提供一种成熟的、经过验证的无刷电机控制方案,帮助开发者快速实现并优化电机控制性能。 其他说明:提供的资料包括详细的原理图、PCB设计文件、源码及测试视频,方便开发者进行学习和应用。
基于有限体积法Godunov格式的管道泄漏检测模型研究.pdf
嵌入式八股文面试题库资料知识宝典-CC++笔试题-深圳有为(2019.2.28)1.zip
少儿编程scratch项目源代码文件案例素材-几何冲刺 V1.5.zip
Android系统开发_Linux内核配置_USB-HID设备模拟_通过root权限将Android设备转换为全功能USB键盘的项目实现_该项目需要内核支持configFS文件系统
C# WPF - LiveCharts Project
少儿编程scratch项目源代码文件案例素材-恐怖叉子 动画.zip
嵌入式八股文面试题库资料知识宝典-嵌⼊式⼯程师⾯试⾼频问题.zip