;;; -*- Mode:Lisp; Syntax: Common-Lisp; Package:ONTOLINGUA-USER; Base:10 -*-

;;; domain theory for the mace satellite gimbal model
;;; (c) 1994 Greg Olsen and Thomas R. Gruber

(in-package "ONTOLINGUA-USER")

(define-theory MACE-DOMAIN (mechanical-components
			    components-with-constraints
			    unary-scalar-functions)
"
The Simplified MACE Model.  MACE is a satellite design.

The model is composed of three major subsystems: structure,
attitude control unit, and pointing systems. The structure is
a flexible segmented tube, or bus, about 1.5 meters long. The
bus is divided into four polycarbonate tubular struts, with
each strut threaded into two cubic aluminum nodes. Each face
of any particular node has fittings for attaching a strut or
other instruments.

The attitude control unit is a single torque wheel
mounted to the node at the center of the bus. A single-axis
rate gyroscope package is attached on the opposite side of the
center node to provide inertial attitude information. When the
gyro indicatea that the structure is rotating, the wheel will
be accelerated or decelerated, preventing the structure from
spinning out of control during experiments.

High precision single-axis pointing mechanisms are mounted on
either end of the bus.  These gimbals will slew payloads to
conduct pointing and tracking tests. Each payload contains a
single-axis rate gyro package, giving the gimbal mechanism access
to the payload's inertial position and allowing the payloads
to be pointed independent of bus orientation. Each gimbal can
point its payload roughly within a 120 degree included angle,
that is, each payload can move +-60 degrees away from
vertical, in two directions.

To conduct active control experiments, a plain strut can be
easily swapped for a segment fitted with piezoelectric
actuators. The replacement strut can have various cross
sections, giving freedom to the type of active control desired
for a particular experiment. The total weight of the system is
projected at about 60 pounds.

The main intent is to be able to point or track with one of the
payloads while the other payload is also moving. Any slewing
gimbal will transmit vibration through the bus, affecting the
performance of the opposite payload.  With this test article, we
can examine various methods for suppressing the bus vibration in
order to increase the overall pointing and tracking performance
of the individual gimbals.

")

(in-theory 'mace-domain)

(define-instance PLANAR-MACE (mechanical-component)
  "Planar-mace is the name of the system object for this assembly.
It is the root of the component tree."
  :slots
  ((instance-of mechanical-component)
   (has-parameter-slot ALPHA X Y)
   ))
      
(define-instance GROUND (mechanical-component)
  "a primitive reference object."
  )
      
(define-function ALPHA (?x) :-> ?q
  "Planar orientation of MACE wrt the GROUND."
  :axiom-def
  (and (parameter-slot-of alpha PLANAR-MACE)
       (= (orientation (reference-frame PLANAR-MACE) 
				       (reference-frame GROUND))
	     (simple-rotation 3 (ALPHA PLANAR-MACE))))
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )

(define-function X (?x) :-> ?q
  "Positition coordinate of MACE wrt the GROUND."
  := (dot (position (reference-point ?x)
		    (reference-point GROUND))
	  (basis.vec (reference-frame GROUND) 1))
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  :axiom-def (parameter-slot-of X PLANAR-MACE)
  )

(define-function Y (?x) :-> ?q
  "Positition coordinate of MACE wrt the GROUND."
  := (dot (position (reference-point ?x)
		    (reference-point GROUND))
	  (basis.vec (reference-frame GROUND) 2))
  :axiom-def (parameter-slot-of Y PLANAR-MACE)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )
      
(define-instance PAYLOAD-1 (mechanical-component)
  :axiom-def (subcomponent-of PAYLOAD-1 PLANAR-MACE)
  )
      
(define-instance PAYLOAD-2 (mechanical-component)
  :axiom-def (subcomponent-of PAYLOAD-2 PLANAR-MACE)
  )
      
(define-instance GIMBAL-1 (mechanical-component)
  :axiom-def (subcomponent-of GIMBAL-1 PLANAR-MACE)
  )
      
(define-function GIMBAL-1-ANGLE (?x) :-> ?q
  :axiom-def (parameter-slot-of GIMBAL-1-ANGLE GIMBAL-1)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )
      
(define-function GIMBAL-1-TORQUE (?x) :-> ?q
  :axiom-def (parameter-slot-of GIMBAL-1-TORQUE GIMBAL-1)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  := (dot (basis.vec (reference-frame GIMBAL-1-BASE) 1)
	  (applied-torque GIMBAL-1-BASE GIMBAL-1-PLATFORM))
  )

(define-instance GIMBAL-1-BASE (mechanical-component)
  :axiom-def (and (subcomponent-of GIMBAL-1-BASE GIMBAL-1)
		  (= (reference-frame GIMBAL-1-BASE) 
		     (reference-frame PLANAR-MACE))
		  (= (position (reference-point GIMBAL-1-BASE) 
			       (reference-point PLANAR-MACE))
		     (* (buslength BUS-ASSY)
			(basis.vec (reference-frame PLANAR-MACE) 1))))
  )
      
(define-instance GIMBAL-1-PLATFORM (mechanical-component)
  :axiom-def (and (subcomponent-of GIMBAL-1-PLATFORM GIMBAL-1)
		  (= (orientation (reference-frame GIMBAL-1-PLATFORM) 
				  (reference-frame GIMBAL-1-BASE))
		     (simple-rotation 3 GIMBAL-1-ANGLE))
		  (= (reference-point GIMBAL-1-PLATFORM) 
		  (reference-point GIMBAL-1-BASE)))
  )
      
(define-instance GIMBAL-2 (mechanical-component)
  :axiom-def (subcomponent-of GIMBAL-2 PLANAR-MACE)
  )
      
(define-instance GIMBAL-2-BASE (mechanical-component)
  :axiom-def (and (subcomponent-of GIMBAL-2-BASE GIMBAL-2)
		  (= (orientation (reference-frame GIMBAL-2-BASE) 
				  (reference-frame PLANAR-MACE))
		     (simple-rotation 3 180))
		  (= (position (reference-point GIMBAL-2-BASE) 
			       (reference-point PLANAR-MACE))
		     (* (- (buslength BUS-ASSY)) 
			(basis.vec (reference-frame PLANAR-MACE) 1))))
  )
      
   
(define-function GIMBAL-2-ANGLE (?x) :-> ?q
  :axiom-def (parameter-slot-of GIMBAL-2-ANGLE GIMBAL-2)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )
      
(define-function GIMBAL-2-TORQUE (?x) :-> ?q
  :axiom-def (parameter-slot-of GIMBAL-2-TORQUE GIMBAL-2)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  := (dot (basis.vec (reference-frame GIMBAL-2-BASE) 1)
	(applied-torque GIMBAL-2-BASE GIMBAL-2-PLATFORM))
  )


(define-instance GIMBAL-2-PLATFORM (mechanical-component)
  :axiom-def (and (subcomponent-of GIMBAL-2-PLATFORM GIMBAL-2)
		  (= (orientation (reference-frame GIMBAL-2-PLATFORM) 
				  (reference-frame GIMBAL-2-BASE))
		     (simple-rotation 3 GIMBAL-2-ANGLE))
		  (= (reference-point GIMBAL-2-PLATFORM) 
		     (reference-point GIMBAL-2-BASE)))
  )
      
(define-instance BUS-ASSY (mechanical-component)
  :axiom-def (and (subcomponent-of BUS-ASSY PLANAR-MACE)
		  (= (reference-frame BUS-ASSY) 
		     (reference-frame PLANAR-MACE))
		  (= (reference-point BUS-ASSY) 
		     (reference-point PLANAR-MACE))
		  (has-parameter-slot BUS-ASSY BUSLENGTH)
		  (has-parameter-slot BUS-ASSY DELTA-1)
		  (has-parameter-slot BUS-ASSY DELTA-2))
  )
      
(define-function BUSLENGTH (?x) :-> ?y
  :axiom-def (parameter-slot-of BUSLENGTH BUS-ASSY)
  :def (and (mechanical-component ?x)
	    (scalar-quantity ?y))
  )

(define-function DELTA-1 (?x) :-> ?q
  :axiom-def (parameter-slot-of DELTA-1 BUS-ASSY)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )
      
(define-function DELTA-2 (?x) :-> ?q
  :axiom-def (parameter-slot-of DELTA-2 BUS-ASSY)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )

(define-instance TORQUE-WHEEL-ASSY (mechanical-component)
  :axiom-def (subcomponent-of TORQUE-WHEEL-ASSY PLANAR-MACE)
  )
      
(define-function WHEEL-ANGLE (?x) :-> ?q
  "Angular displacement of torque wheel."
  :axiom-def (parameter-slot-of WHEEL-ANGLE TORQUE-WHEEL-ASSY)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  )
      
(define-function WHEEL-TORQUE (?x) :-> ?q
  "Angular displacement of torque wheel."
  :axiom-def (parameter-slot-of WHEEL-TORQUE TORQUE-WHEEL-ASSY)
  :def (and (mechanical-component ?x)
	    (time-quantity ?q))
  := (dot (basis.vec (reference-frame ACTUATOR-BASE) 1)
	(applied-torque ACTUATOR-BASE TORQUE-WHEEL))
  )

(define-instance ACTUATOR-BASE (mechanical-component)
  :axiom-def (and (subcomponent-of ACTUATOR-BASE TORQUE-WHEEL-ASSY)
		  (= (reference-frame ACTUATOR-BASE) 
		     (reference-frame PLANAR-MACE))
		  (= (reference-point ACTUATOR-BASE) 
		     (reference-point PLANAR-MACE)))
  )
      
(define-instance TORQUE-WHEEL (mechanical-component)
  :axiom-def (and (subcomponent-of TORQUE-WHEEL TORQUE-WHEEL-ASSY)
		  (= (orientation (reference-frame TORQUE-WHEEL) 
				  (reference-frame ACTUATOR-BASE))
		     (simple-rotation 3 WHEEL-ANGLE))
		  (= (reference-point TORQUE-WHEEL) 
		     (reference-point ACTUATOR-BASE)))
  )
      
   
   
   


This Lisp-to-HTML translation was brought to you by
François Gerbaux and Tom Gruber