DoorOptExtended - function DoorOptExtended % Function...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
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 % normalized unit of torque % % Constraints: % A*x = b (linear in x)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

DoorOptExtended - function DoorOptExtended % Function...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online