Control System Design 
Optimal design problem...The potential of simulation based design is widely recognized yet the shortage of easily applicable tools appears to be constraining the application of this important methodology. Illustrated here is the use of this technology on the design of a hybrid control system by determining an optimal digital leadlag compensator. As evidenced by the handful of steps SDX delivers mileage that you won't find anywhere else. 
Solution road map... The code is comprised of three segments. With the exception of user defined performance function  which calculates the area between the actual and desired system response  the steps are a cookbook assembly of SDX modeling functions. The midsection is an "interface" between the system model and optimization module which controls the design process from an arbitrary initial guess to the delivery of the optimal solution. 

Results visualized...The graph shows system responses before and after optimization including the output of the optimal digital compensator. Note that the same setup also solves a Digital Redesign problem, i.e. refit the system with a digital equivalent of the analog component. 

Cost/Performance comparison... Solving these types of design problems can be a challenging and costly experience. For instance, ACSL and SystemBuild, representing special purpose language and graphical environments respectively, bill their products with claims of "No Programming Required!". Maybe so, however this is not reflected in their cost/performance index when attempting to solve this important class of problems. Whatever the preference, take your pick  a few compact statements or endless mouse clicks through a maze of graphics, workspaces and scripts. 