%% Header
% Purpose:  Creating the process transfer function G (struct).
% Author:   Axel Lodemel Holene (based on work done by Martin
%           Foss (2012)).
% E-mail:   axel.holene@gmail.com
% Date:     February 2013
% About:    h       nonlinear inequality constraints
%           h_eq    nonlinear equality constraints
%           Ms_s    Setpoint value for Ms
%   

function [h h_eq] = conFun(ctrl, parm)
    h    = [] ;            % No nonlinear inequality constraints
    G    = parm.G ;
    C    = controller(ctrl, parm) ;
    h_eq = parm.Ms_s - max(abs(freqresp(1/(1 + G.tf*C.tf), ...
                           logspace(-4,4,40000)))) ;
end
