📄 rrdesign.html
字号:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML is auto-generated from an M-file.
To make changes, update the M-file and republish this document.
-->
<title>Designing for Reliability and Robustness</title>
<meta name="generator" content="MATLAB 7.5">
<meta name="date" content="2008-01-10">
<meta name="m-file" content="rrdesign"><style>
body {
background-color: white;
margin:10px;
}
h1 {
color: #990000;
font-size: x-large;
}
h2 {
color: #990000;
font-size: medium;
}
/* Make the text shrink to fit narrow windows, but not stretch too far in
wide windows. */
p,h1,h2,div.content div {
max-width: 600px;
/* Hack for IE6 */
width: auto !important; width: 600px;
}
pre.codeinput {
background: #EEEEEE;
padding: 10px;
}
@media print {
pre.codeinput {word-wrap:break-word; width:100%;}
}
span.keyword {color: #0000FF}
span.comment {color: #228B22}
span.string {color: #A020F0}
span.untermstring {color: #B20000}
span.syscmd {color: #B28C00}
pre.codeoutput {
color: #666666;
padding: 10px;
}
pre.error {
color: red;
}
p.footer {
text-align: right;
font-size: xx-small;
font-weight: lighter;
font-style: italic;
color: gray;
}
</style></head>
<body>
<div class="content">
<h1>Designing for Reliability and Robustness</h1>
<introduction>
<p>by Stuart Kozola</p>
<p>Code used in Jan 2008 Digest Article of same title. <a href="http://http://www.mathworks.com/company/newsletters/digest/2008/jan/">http://http://www.mathworks.com/company/newsletters/digest/2008/jan/</a></p>
<p>No design is free from uncertainty or natural variation. For example, how will the design be used? How will it respond to
environmental factors or to changes in manufacturing or operational processes? These kinds of uncertainty compound the challenge
of creating designs that are reliable and robust –designs that perform as expected over time and are insensitive to changes
in manufacturing, operational, or environmental factors.
</p>
<p>Using an automotive suspension system as an example, this article describes tools and techniques in MATLAB®, Statistics Toolbox™,
and Optimization Toolbox™ software that let you extend a traditional design optimization approach to account for uncertainty
in your design, improving quality and reducing prototype testing and overall development effort.
</p>
<p>We begin by designing a suspension system that minimizes the forces experienced by front- and rear-seat passengers when the
automobile travels over a bump in the road. We then modify the design to account for suspension system reliability; we want
to ensure that the suspension system will perform well for at least 100,000 miles. We conclude our analysis by verifying
that the design is resilient to, or unaffected by, changes in cargo and passenger mass.
</p>
</introduction>
<h2>Contents</h2>
<div>
<ul>
<li><a href="#2">Performing Traditional Design Optimization</a></li>
<li><a href="#11">Ensuring Suspension System Reliability</a></li>
<li><a href="#14">Optimizing for Robustness</a></li>
<li><a href="#19">Design Trade-Offs</a></li>
<li><a href="#20">Products used</a></li>
<li><a href="#21">Resources</a></li>
</ul>
</div><pre class="codeinput"><span class="comment">% verify installed products are available</span>
checkLicense
</pre><h2>Performing Traditional Design Optimization<a name="2"></a></h2>
<p>Our Simulink suspension system model has two inputs – the bump starting and ending height – and eight adjustable parameters.
We can modify the four parameters that define the front and rear suspension system stiffness and damping rate: kf, kr, cf,
cr. The remaining parameters are defined by applying passenger and cargo loading to the vehicle and are not considered to
be design parameters.
</p><pre class="codeinput">clc, close <span class="string">all</span>, clear <span class="string">all</span>
<span class="comment">% Model parameters</span>
<span class="comment">% Constants</span>
s.g = 9.81; <span class="comment">% gravity (m/s^2)</span>
<span class="comment">% Car Geometry</span>
s.Lf = 0.9; <span class="comment">% front hub displacement from body CG (m)</span>
s.Lr = 1.2; <span class="comment">% rear hub displacement from body CG (m)</span>
s.rf = 0.5*s.Lf; <span class="comment">% location of front passengers (m)</span>
s.rr = 0.9*s.Lr; <span class="comment">% location of rear passengers (m)</span>
s.rt = 1.1*s.Lr; <span class="comment">% location of trunk (m)</span>
s.Mb = 1300; <span class="comment">% nominally loaded car mass (kg) (1200 empty)</span>
s.Iyy = 2100; <span class="comment">% body moment of inertia about y-axis (kgm^2)</span>
<span class="comment">% Initial suspension design</span>
s.kf0 = 19600; <span class="comment">% front suspension stiffness (N/m)</span>
s.cf0 = 2200; <span class="comment">% front suspension damping (N/(m/s))</span>
s.kr0 = 14700; <span class="comment">% rear suspension stiffness (N/m)</span>
s.cr0 = 2000; <span class="comment">% rear suspension damping (N/(m/s))</span>
<span class="comment">% Bump height</span>
s.hb = 0.1;
<span class="comment">% Show simulink model and dialog</span>
open(<span class="string">'mldemo_suspnslow.mdl'</span>)
open_system(<span class="string">'mldemo_suspnslow/Suspension Model'</span>)
</pre><img vspace="5" hspace="5" src="rrdesign_01.png"> <p>The model outputs are angular acceleration about the center of gravity (thetadotddot) and vertical acceleration (zdotdot).
The Figure below illustrates the model response for our initial design to a simulated bump in the road.
</p><pre class="codeinput"><span class="comment">% Initial Design (Run Simulink Model with Initial Design)</span>
f = [1 3];
r = [2 4];
x0 = [s.kf0 s.cf0 s.kr0 s.cr0];
cost0 = myCostFcn_slow(x0,s);
</pre><img vspace="5" hspace="5" src="rrdesign_02.png"> <p>Our goal is to set the parameters kf, kr, cf, and cr to minimize the discomfort that front- and rear-seat passengers experience
as a result of traveling over a bump in the road. We use acceleration as a proxy for passenger discomfort. The design optimization
problem can be summarized as follows:
</p><pre>Objective: Minimize peak and total acceleration
Design variables: Front/rear spring/shock absorber design (kr, kr, cf, cr)</pre><pre>Design constraints: Car is level when at rest.
Suspension system maintains a natural frequency of vibration below 2 Hz.
Damping ratio remains between 0.3 and 0.5.</pre><p>This problem is nonlinear in both response and design constraints. To solve it, a nonlinear optimization solver is required.
The Optimization Toolbox solver <tt>fmincon</tt> is designed specifically for this type of problem.
</p>
<p>We begin by casting our optimization problem into the form accepted by <tt>fmincon</tt>. The table below summarizes the problem formulation that <tt>fmincon</tt> accepts and the definition of the suspension problem in MATLAB syntax.
</p><pre class="codeinput">suspnHtmlTable
</pre><html>
<table border="1" cellpadding="5" cellspacing="0">
<tr style="background:whitesmoke">
<th></th>
<th>fmincon Standard Form </th>
<th>Suspension Problem (MATLAB m-code)</th>
</tr>
<tr>
<th style="background:whitesmoke">Objective</th>
<td>min f(x)</td>
<td>myCostFcn(x,simParms)</td>
</tr>
<tr>
<th style="background:whitesmoke">Design variables</th>
<td>x</td>
<td>x = [kf, cf, kr, cr]</td>
</tr>
<tr>
<th style="background:whitesmoke">Nonlinear constraints</th>
<td><table>
<tr><td>c(x) <= 0</td></tr>
<tr><td>ceq(x) = 0</td></tr>
</table></td>
<td>myNonlCon(x,simParms)</td>
</tr>
<tr>
<th style="background:whitesmoke">Linear constraints</th>
<td><table>
<tr><td>A*x <= 0</td></tr>
<tr><td>Aeq*x = 0</td></tr>
</table></td>
<td><table>
<tr><td>A = []; % none for this problem</td></tr>
<tr><td>b = [];</td></tr>
<tr><td>Aeq = [Lf 0 -Lr 0]; % level car</td></tr>
<tr><td>beq = 0;</td></tr>
</table></td>
</tr>
<tr>
<th style="background:whitesmoke">Bound constraints</th>
<td>lb <= x <= ub </td>
<td><table>
<tr><td>lb = [10000; 100; 10000; 100];</td></tr>
<tr><td>ub = [100000; 10000; 100000; 10000];</td></tr>
</table></td>
</tr>
</table>
</html<p>The design objective is defined as an M-file function myCostFcn that accepts two inputs: the design vector x and simParms.
x contains our design variables for the suspension system. simParms is a structure that passes in the remaining defining
parameters of the Simulink model (Mb, Lf, Lr, and Iyy). myCostFcn runs the suspension model defined by x and simParms and
returns a measure of passenger discomfort, calculated as the weighted average of the peak and total acceleration, as shown
below. Passenger discomfort is normalized so that our initial design has a discomfort level of 1.
</p><pre class="codeinput"><span class="comment">% close original simulink model</span>
close_system
type <span class="string">myCostFcn</span>
</pre><pre class="codeoutput">
function mycost = myCostFcn(x,simParms)
%% Unpack simParms structure for Simulink Use
struct2var(simParms)
%% Extract suspension variables
kf = x(1); cf = x(2);
kr = x(3); cr = x(4);
%% Run Simulink model
% Initial Conditions for Simulink Model
theta0 = 0; % initial pitch (rad)
thetadot0 = 0; % initial pitch rate (rad/s)
Z0 = -0.5*Mb*g/(kf+kr); % initial equilibrium position, assumes full car (m)
Zdot0 = 0; % initial bounce rate (m/s)
simTime = [0 8];
sim('mldemo_suspnfast.mdl',simTime,...
simset('SrcWorkspace', 'current', 'DstWorkspace', 'current'))
%% Compute cost
totalAccel = (Zdotdot + rf * thetadotdot).^2 + ...
(Zdotdot - rr * thetadotdot).^2;
%% Return final value
mycost = 0.5*max(totalAccel)/56 + 0.5 * sum(totalAccel)/904;
assignin('base','totAccel',totalAccel);
</pre><p>Nonlinear constraints are defined in the M-file function myNonlCon that returns values for c(x) and ceq(x).</p><pre class="codeinput">type <span class="string">myNonlCon</span>
</pre><pre class="codeoutput">
function [c,ceq] = myNonlCon(x,simParms)
%% mynonlcon.m Nonlinear constraints for fmincon.
% Extract suspension variables
kf = x(1);
cf = x(2);
kr = x(3);
cr = x(4);
% Extract parameters needed for constraints
struct2var(simParms)
%% Define Desired Damping Coefficient
%cd = 0.40;
% Can tolerate a +/-10% change from desired damping coefficient
cupper = 0.5; % upper limit for damping coefficients
clower = 0.3; % lower limit for damping coefficients
%% Compute Constraints
Mf = Mb*Lr/(Lf+Lr)/2;
Mr = Mb*Lf/(Lf+Lr)/2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -