This study introduces an integrated control framework that combines stochastic Petri nets with
ontology-based knowledge representation to improve safety and efficiency during collaborative human–
robot assembly. The objective is to endow a robotic coworker with the ability to reason about uncertain human
actions while respecting semantic task constraints. The method maps ontology concepts, relations, and individuals
to places, transitions, and tokens of a stochastic Petri net, yielding a unified state-space model governed
by probabilistic firing rates and logical axioms. Procedures include formal reachability analysis for
deadlock and hazard detection, synthesis of an optimal task-allocation policy that maximizes a cumulative
reward balancing speed and safety, and implementation of the entire model in the Webots simulator. Experimental
investigations were carried out on a pick-and-place assembly scenario involving a six-degree-of-freedom
manipulator and a human operator across 100 simulation trials. The proposed controller achieved a 27%
reduction in average assembly time and a 42% decrease in unsafe proximity events relative to a time-triggered
baseline, while eliminating all deadlock states identified in the reachability graph. The results demonstrate that
the semantic–probabilistic integration provides a viable foundation for next-generation collaborative robot controllers
capable of adapting to variable human behavior without compromising safety or productivity.