If I Don't Do anything Else

John has got a economic paper to write. He put a piece of paper in the typewriter, ate a piece of candy and looked out from the window for a while. Just as setting about it, he realized that he hasn't written to his family since Thanksgiving. Then he thought I would write the paper after finishing the letter. After doing that, he found that typewriter ribbon was out of link. Then he changed a new ribbon. While changing it, the link fell down he fingers. So he had to wash he hand. While washing hand, he found that his fingernails were to long. So he had to cut it immediately. After having finished  all these, it's time for lunch, and he thought I would write the paper after lunch if I didn't do anything else. 

-------------------------------------------------

Everyday a little story to practice the English.   

position_pid function [Output_rpm,ARV] = fcn(toolface_ref,toolface_fdb,ARV) %========初始化处理======== % ARV = AccumulatorRunningValue ; AccumulatorPositiveSaturationLimit = 1000 ; % inf ; % 40 ; AccumulatorNegativeSaturationLimit = -1000 ; % -inf ; % -40 ; PositiveRateLimit_rpm = 10; % inf ; % 10 ; NegativeRateLimit_rpm = -10; % -inf ; % -10 ; %========position PI 参数设置======== Kp =1.5; %1.5,% 7.5 ; % 7.5 Ki =0.001; %0.01 ;%0.28 ; % 0.28 %========PI 结构======== Error = toolface_ref - toolface_fdb; % Compute the error ARV = ARV + Error ; % ARV = AccumulatorRunningValue 累加器运行值,累计误差,即积分 % Limit the accumulator to the saturation limit - positive or negative. % 将累加器限制到饱和极限-正或负。 if ( ARV >= AccumulatorPositiveSaturationLimit ) ARV = AccumulatorPositiveSaturationLimit ; elseif ( ARV <= AccumulatorNegativeSaturationLimit ) ARV = AccumulatorNegativeSaturationLimit ; % If not saturated then don't do anything - this else is for MISRA % compliance 服从 % else % % ; % Do nothing - this comment needed for Lint! end Result = Kp *10 * Error + Ki * ARV *10 ; % *1/10 ;* 3 ;* 1/20 % Result = Kp * Error + Ki * ARV ; % *1/10 ;* 3 ;* 1/20 % If the proposed output exceeds the positive or negative limit then clamp at the limit, otherwise proposed output is OK. % 通俗讲,就是输出(速度不能超过±10)。 if ( Result > PositiveRateLimit_rpm ) Output_rpm = PositiveRateLimit_rpm ; elseif ( Result < NegativeRateLimit_rpm ) Output_rpm = NegativeRateLimit_rpm ; else Output_rpm = Result ;解释并描述这段代码
最新发布
04-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值