Sheet1
Page 1
function DoorOptExtended
% Function DoorOpt
% Solve for reactions in a door with two hinges using a Matlab
% function optimization
%
% The top hinge is 1, and bottom hinge is 2, the door width is a, the
% door height is b, the door mass is m, and gravity is g.
%
% Usage:
DoorOpt
%
% Params: a = door width
%
b = door height
%
m = door mass
%
g = gravity
%
The top hinge is 1 and the bottom hinge is 2.
%
X is to the right, Y is vertically upward, and Z is
%
perpendicular to the door face. The hinges are on the
%
left side of the door.
%
% Outputs: Hinge reaction loads Fx, Fy, and Mz for each of the three cases above,
%
where x = [Fx
global w Aeq beq
% Define parameter values
m = 100
c = 3
d = 8
g = 32.2
% Formulate the optimization problem and decide which category it is
%
% Design variables:
%
x = [Fx1 Fy1 Mz1 Fx2 Fy2 Mz2]'
%
% Weights:
%
w = [m*g m*g m*g*c/2 m*g m*g m*g*c/2]'
%
% Cost function:
%
min sum((xi/wi)^2) = min sum((1/wi)^2*xi^2) (quadratic in x)
% where each xi value is normalized by a corresponding wi value
% so that 1 normalized unit of force is as "expensive" as one
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 RAPHAELHAFTKA
 Operations Research, matlab, Linear Programming, Optimization, Quadratic programming

Click to edit the document details