Clutch

model Clutch "Clutch based on Coulomb friction"
    extends Modelica.Mechanics.Rotational.Icons.Clutch;
    extends Modelica.Mechanics.Rotational.Interfaces.PartialCompliantWithRelativeStates;

    parameter Real mue_pos[:,2] = [0,0.5] "[w,mue] positive sliding friction coefficient (w_rel>=0)";
    parameter Real peak(final min = 1) = 1 "Peak for maximum value of mue at w==0 (mue0_max = peak*mue_pos[1,2])";
    parameter Real cgeo(final min = 0) = 1 "Geometry constant containing friction distribution assumption";
    parameter SI.Force fn_max(final min = 0, start = 1) "Maximum normal force";

    extends Rotational.Interfaces.PartialFriction;
    extends Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPortWithoutT;

    Real mue0 "Friction coefficient for w=0 and forward sliding";
    SI.Force fn "Normal force (fn=fn_max*f_normalized)";
    Modelica.Blocks.Interfaces.RealInput f_normalized "Normalized force signal 0..1 (normal force = fn_max*f_normalized; clutch is engaged if > 0)"
        annotation (Placement(transformation(
            origin = {0, 110},
            extent = {
                {20, -20}, 
                {-20, 20}},
            rotation = 90)));
equation
    a_relfric = a_rel;
    fn = fn_max * f_normalized;
    free = fn <= 0;
    lossPower = tau * w_relfric;
    mue0 = Modelica.Math.Vectors.interpolate(mue_pos[:,1], mue_pos[:,2], 0, 1);
    tau = if locked then sa * unitTorque else if free then 0 else cgeo * fn * (if startForward then Modelica.Math.Vectors.interpolate(mue_pos[:,1], mue_pos[:,2], w_rel, 1) else if startBackward then -Modelica.Math.Vectors.interpolate(mue_pos[:,1], mue_pos[:,2], w_rel, 1) else if pre(mode) == Forward then Modelica.Math.Vectors.interpolate(mue_pos[:,1], mue_pos[:,2], w_rel, 1) else -Modelica.Math.Vectors.interpolate(mue_pos[:,1], mue_pos[:,2], -w_rel, 1));
    tau0 = mue0 * cgeo * fn;
    tau0_max = peak * tau0;
    w_relfric = w_rel;

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {-150, -110}, 
                        {150, -70}},
                    textString = "%name",
                    lineColor = {0, 0, 255}), 
                Line(
                    visible = useHeatPort,
                    points = {
                        {-100, -100}, 
                        {-100, -40}, 
                        {0, -40}},
                    color = {191, 0, 0},
                    pattern = LinePattern.Dot)}),
        Documentation(info = "<html>\n<p>\nThis component models a <strong>clutch</strong>, i.e., a component with\ntwo flanges where friction is present between the two flanges\nand these flanges are pressed together via a normal force.\nThe normal force fn has to be provided as input signal f_normalized in a normalized form\n(0 &le; f_normalized &le; 1),\nfn = fn_max*f_normalized, where fn_max has to be provided as parameter. Friction in the\nclutch is modelled in the following way:\n</p>\n<p>\nWhen the relative angular velocity is not zero, the friction torque is a\nfunction of the velocity dependent friction coefficient  mue(w_rel) , of\nthe normal force \"fn\", and of a geometry constant \"cgeo\" which takes into\naccount the geometry of the device and the assumptions on the friction\ndistributions:\n</p>\n<pre>\n        frictional_torque = <strong>cgeo</strong> * <strong>mue</strong>(w_rel) * <strong>fn</strong>\n</pre>\n<p>\n   Typical values of coefficients of friction:\n</p>\n<pre>\n      dry operation   :  <strong>mue</strong> = 0.2 .. 0.4\n      operating in oil:  <strong>mue</strong> = 0.05 .. 0.1\n</pre>\n<p>\n   When plates are pressed together, where  <strong>ri</strong>  is the inner radius,\n   <strong>ro</strong> is the outer radius and <strong>N</strong> is the number of friction interfaces,\n   the geometry constant is calculated in the following way under the\n   assumption of a uniform rate of wear at the interfaces:\n</p>\n<pre>\n         <strong>cgeo</strong> = <strong>N</strong>*(<strong>r0</strong> + <strong>ri</strong>)/2\n</pre>\n<p>\n    The positive part of the friction characteristic <strong>mue</strong>(w_rel),\n    w_rel >= 0, is defined via table mue_pos (first column = w_rel,\n    second column = mue). Currently, only linear interpolation in\n    the table is supported.\n</p>\n<p>\n   When the relative angular velocity becomes zero, the elements\n   connected by the friction element become stuck, i.e., the relative\n   angle remains constant. In this phase the friction torque is\n   calculated from a torque balance due to the requirement, that\n   the relative acceleration shall be zero.  The elements begin\n   to slide when the friction torque exceeds a threshold value,\n   called the  maximum static friction torque, computed via:\n</p>\n<pre>\n       frictional_torque = <strong>peak</strong> * <strong>cgeo</strong> * <strong>mue</strong>(w_rel=0) * <strong>fn</strong>   (<strong>peak</strong> >= 1)\n</pre>\n<p>\nThis procedure is implemented in a \"clean\" way by state events and\nleads to continuous/discrete systems of equations if friction elements\nare dynamically coupled. The method is described in\n(see also a short sketch in <a href=\"modelica://Modelica.Mechanics.Rotational.UsersGuide.ModelingOfFriction\">UsersGuide.ModelingOfFriction</a>):\n</p>\n<dl>\n<dt>Otter M., Elmqvist H., and Mattsson S.E. (1999):</dt>\n<dd><strong>Hybrid Modeling in Modelica based on the Synchronous\n    Data Flow Principle</strong>. CACSD'99, Aug. 22.-26, Hawaii.</dd>\n</dl>\n<p>\nMore precise friction models take into account the elasticity of the\nmaterial when the two elements are \"stuck\", as well as other effects,\nlike hysteresis. This has the advantage that the friction element can\nbe completely described by a differential equation without events. The\ndrawback is that the system becomes stiff (about 10-20 times slower\nsimulation) and that more material constants have to be supplied which\nrequires more sophisticated identification. For more details, see the\nfollowing references, especially (Armstrong and Canudas de Wit 1996):\n</p>\n<dl>\n<dt>Armstrong B. (1991):</dt>\n<dd><strong>Control of Machines with Friction</strong>. Kluwer Academic\n    Press, Boston MA.<br></dd>\n<dt>Armstrong B., and Canudas de Wit C. (1996):</dt>\n<dd><strong>Friction Modeling and Compensation.</strong>\n    The Control Handbook, edited by W.S.Levine, CRC Press,\n    pp. 1369-1382.<br></dd>\n<dt>Canudas de Wit C., Olsson H., &Aring;str&ouml;m K.J., and Lischinsky P. (1995):</dt>\n<dd><strong>A new model for control of systems with friction.</strong>\n    IEEE Transactions on Automatic Control, Vol. 40, No. 3, pp. 419-425.</dd>\n</dl>\n\n<p>\nSee also the discussion\n<a href=\"modelica://Modelica.Mechanics.Rotational.UsersGuide.StateSelection\">State Selection</a>\nin the User's Guide of the Rotational library.\n</p>\n</html>"));
end Clutch;